|
DrawArea.rect - Controlling Border Width |
Posted by Mo on Mar-30-2015 20:31 |
|
Hello,
Is there a way to change the thickness of the border in methods such as DrawArea.rect
and DrawArea.polygon?
Thanks in anticipation |
Re: DrawArea.rect - Controlling Border Width |
Posted by Peter Kwan on Mar-31-2015 04:20 |
|
Hi Mo,
Unluckily, there is no API to specify thick borders. The only method is to draw thick lines
(using DrawArea.line) connecting the vertices of the rectangle or polygons. This method
can work quite well for rectangles. For polygons, it should work fine if the line is not too
thick.
Regards
Peter Kwan |
Re: DrawArea.rect - Controlling Border Width |
Posted by Mo on Mar-31-2015 04:22 |
|
Thanks for your reply. |
Re: DrawArea.rect - Controlling Border Width |
Posted by Daniel on Mar-31-2015 15:06 |
|
Hi Peter,
These graphic primitives are indeed quite useful, especially within a dynamic layer:)
Any chance we get enhancements to the drawarea class "graphics primitives" in the coming 6.0 version? I was looking for a decent way to add rounded boxes but did not find it!
Daniel |
Re: DrawArea.rect - Controlling Border Width |
Posted by Peter Kwan on Apr-01-2015 04:21 |
|
Hi Daniel,
We have already finished development of the ChartDirector 6.0 and is now working on the
sample code and documentation, so it is too late now for us to add more features to
ChartDirector 6.0.
The only method I can think of to use DrawArea to add rounded rectangles is to add it as a
polygon. The "rounded corners" can be approximated by a polygon of a few vertices. This is
how ChartDirector draw rounded corners internally. For small rounded corners (radius of a
few pixels), usually 4 or 5 vertices on each corner is more than sufficient.
Regards
Peter Kwan |
Re: DrawArea.rect - Controlling Border Width |
Posted by Daniel on Apr-01-2015 14:00 |
|
>We have already finished development of the ChartDirector 6.0 and is now working on the
>sample code and documentation, so it is too late now for us to add more features to
>ChartDirector 6.0.
The truth, Peter? I wanted to hear about the delivery process. I am sure not alone who wish for a delivery timeframe! Keep the good work on:)
>The only method I can think of to use DrawArea to add rounded rectangles is to add it as
>a polygon. The "rounded corners" can be approximated by a polygon of a few vertices.
>This is how ChartDirector draw rounded corners internally.
If Chartdirector does it internally - the result is always up to it - we, as plain user, certainly can work per a polygon approximation as well. Thanks for the tip.
Daniel |
|