all groups > dotnet drawing api > december 2003 >
You're in the

dotnet drawing api

group:

Unespected behaviour of graphicsPath


Unespected behaviour of graphicsPath Crirus
12/29/2003 10:33:28 AM
dotnet drawing api:
Hi!

I just made a test on graphicsPath

I added 3 circles to a GraphicsPath and filled with one color into a panel
paint event..

What I noticed is that the overlapped part of 2 circles is not filled as it
is not inside the path...
How can I add multiple closed figures as circles to a GP and all regions
added up to be considered as part of the path and filled out?

Thanks
Crirus


Re: Unespected behaviour of graphicsPath Bob Powell [MVP]
12/29/2003 5:43:37 PM
When you create the GraphicsPath you can specify the fill-mode. The default
is Alternate and will produce a shape with holes where two shapes overlap.
Create the path with a Winding fill mode to get a path that is a union of
all the shapes in it.

--
Bob Powell [MVP]
C#, System.Drawing

The November edition of Well Formed is now available.
Learn how to create Shell Extensions in managed code.
http://www.bobpowell.net/currentissue.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/gdiplus_faq.htm

Read my Blog at http://bobpowelldotnet.blogspot.com

[quoted text, click to view]

Re: Unespected behaviour of graphicsPath Crirus
12/29/2003 6:52:54 PM
Found that..may I hope this is only a fill behaviour and a region from this
path is union of the shapes?


[quoted text, click to view]

AddThis Social Bookmark Button