We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Suggested Performance Improvement

If a line style.width = 0, you should not draw the border.

So for every DrawBorder method, do:
if (LineStyle.BorderWidth >0)
{

}

Same for the Node's DrawInterior() method regarding FillStyles:

if (FillStyle.Type == Solid && (FillStyle.BackColor == Color.Transparent || FillStyle.BackColor == Color.None))
{
//do not DrawInterior
}

Otherwise, for empty backgrounds you're creating a brush and doing a FillPath for NO reason.

**** IDEALLY *****
You should really add a "Visible" attribute to both FillStyle and LineStyle classes. Then, check first if Visible before doint DrawBorder or DrawInterior actions.
*************************************
In many cases, this simple, very easy to implement change would produce significant performance improvements.
*************************************

ALSO: you need to make DrawShading a protected method. Otherwise, if I create a derived class of say Ellipse Node, and want to implement my own Render method, or my own DrawInterior method, I have to implement my own shading, b/c your DrawShading method is private!


Thanks
Eric


2 Replies

AM Ajeet M Syncfusion Team February 11, 2009 01:01 PM UTC

Hi Eric,

Thanks for this important update. I have logged this as a defect report and we shall start to work on this shortly.

Let me know if you shall need any further clarifications in this regard.

Warm Regards,
Ajeet




AD Administrator Syncfusion Team April 15, 2009 11:18 AM UTC

Hi Eric,

The defect has been fixed in our latest codebase, and if you would like to receive a solution, then please contact Syncfusion Support (email: support@syncfusion.com) as we cannot provide defect fixes in a public forum.

Regards,
Dinesh


Loader.
Live Chat Icon For mobile
Up arrow icon