|
DrawArea Class - Change Line style + Width + Color |
Posted by Sal on Jul-07-2015 04:08 |
|
Hello Peter,
Using DrawArea class only...
I have drawn an irregular polygon using the polygon() method of the DrawArea class.
I would like to draw over the polygon a vertical line.
I have been able to draw and change color of the line using:
d->vline(......, crefColor)
If I use the above, the Line Is always Solid
I would like to use a Dash Type Line.
I tried:
d->dashLineColor(crefColor, DashLine);
before the previous vLine call
Q1: The Line style does not change.
Any suggestion ?
Q2: If I was correct, how do I return to use a solid Line type from Dash?
I do not see that listed in dashLinecolor() API styles of line
Q3: Is there a method to change the width of the line when using DrawArea of the fly?
Q4: Lastly, is there an example that uses DrawArea class Drawing methods only ?
Thanks
Sal |
Re: DrawArea Class - Change Line style + Width + Color |
Posted by Sal on Jul-08-2015 00:47 |
|
Hi Peter,
I was able to resolve the first 2 Questions on my own (I came across the answer browsing for something else).
I was basically correct in using the mentioned functions, I did not realize I had to combine them in the same call as follows:
d->vline( ptY[0], ptY[1], ptX[0], d->dashLineColor(crefColor, Chart::DashLine));
So, I still need help with changing the width of the Line used for the drawing.
Also, some available sample that use the DrawArea class Methods
Thanks
Sal |
Re: DrawArea Class - Change Line style + Width + Color |
Posted by Peter Kwan on Jul-08-2015 01:24 |
|
Hi Sal,
You can use DrawArea.line to draw a line with a line width. For example:
d->line(ptX[0], ptY[0], ptX[0], ptY[1], d->dashLineColor(crefColor, Chart::DashLine), 2);
Hope this can help.
Regards
Peter Kwan |
|