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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Suggested Performance Improvement

Thread ID:





79436 Feb 10,2009 12:46 AM UTC Apr 15,2009 11:18 AM UTC WinForms 2
Tags: Diagram
Eric Robishaw
Asked On February 10, 2009 12:46 AM UTC

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!


Ajeet M [Syncfusion]
Replied On 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,

Administrator [Syncfusion]
Replied On 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.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon