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.
Unfortunately, activation email could not send to your email. Please try again.

Dynamic FillStyle changing

Thread ID:

Created:

Updated:

Platform:

Replies:

43525 Apr 25,2006 10:41 AM May 5,2006 03:03 AM Windows Forms 2
loading
Tags: Diagram
Johann Schraml
Asked On April 25, 2006 10:41 AM

Hi, I have to change programmatically the FillStyle of any Symbol so that the filling grows in percent of the Symbol bounds (take a look at the static example I added). Thereby the filling mechanism should act in any direction (south -> north; n->s; w->e;e->w). In addition to that it would be great if I could set a color gradient on the margin of the current fill height and the width of the color gradient. How do I get this started? Many thanks in advance, Uli

DynamicFillStyle.zip

Administrator [Syncfusion]
Replied On May 3, 2006 09:31 AM

Hi Uli, My apologies for the delay in getting back to you. The way to go about this would be by sub classing the FilledShape class and overriding the Draw() method with the suitable implementation. The Draw() in the FilledShape class is used to fill the interior of a shape Node. The FilledShape. Draw() method calls the CreateBrush( Graphics grfx,RectangleF fillBounds ) method which is used to fill the region to the amount specified by the fillBounds. And hence providing the desired value to the fillbounds will let you fill the color to the specified value. I hope this information will help you and let me know if you have any further queries. Regards, Praveena.

Johann Schraml
Replied On May 5, 2006 03:03 AM

Hi Praveena, thanks again for your help. To get the filling running as expected I have to: fillBounds.Height = x; fillBounds.Width = x; Region reg = new Region(clonePath); reg.Exclude(fillBounds); grfx.FillRegion(brush, reg); greetz, Uli

CONFIRMATION

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.

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.

;