Hello, I'm fairly new to JUCE and C++ but I've taken a break from my normal C++ studies (Standard Library) to play with the more colorful JUCE.
So anyways here I am doing this Graphics class tutorial and I'm having the time of my life drawing text and making them diffrent colors and then I move on drawing lines and get to the excercise and see the following:
~~ExerciseExplore other types of lines. Can you figure out how to draw dashed lines, or arrows? Hint: have a look at the Graphics class documentation.
So I'm looking at the documentation and in all my studies of programing I get stumped on these. I see these when attempting to figure out how to use CooCox and a STM32F4-Discovery board. I still don't understand....I'm hoping to get a break down on this and maby understand these as some are simple to figure out while other are not so easy.
Please help break down this info from http://learn.juce.com/doc/tutorial_graphics_class.php
~~void Graphics::drawDashedLine ( const Line< float > & line, const float * dashLengths, int numDashLengths, float lineThickness = 1.0f, int dashIndexToStartFrom = 0 ) const
~~Draws a dashed line using a custom set of dash-lengths. Parameters line the line to draw dashLengths a series of lengths to specify the on/off lengths - e.g. { 4, 5, 6, 7 } will draw a line of 4 pixels, skip 5 pixels, draw 6 pixels, skip 7 pixels, and then repeat. numDashLengths the number of elements in the array (this must be an even number). lineThickness the thickness of the line to draw dashIndexToStartFrom the index in the dash-length array to use for the first segment See alsoPathStrokeType::createDashedStroke
so the first bit of confusion is this.
I understand the author made a template function in the graphics class.
so in my situation I would begin the code as such g.drawDashedLine (I'm confused on this part)(const Line<float>, const float* dashLengths, int numDashLength, Float LineThickness = 1.0f, int dashIndexToStartFrom = 0) const
example code will help me a bit. Thanks I know I should know my C++ better....