all groups > dotnet drawing api > october 2006 >
You're in the

dotnet drawing api

group:

Getting a path from the intersection of two regions


Getting a path from the intersection of two regions Valerie Hough
10/27/2006 1:48:32 PM
dotnet drawing api:
Hi,
I would like to be able to determine the outline of the intersection of two
polygons, even in the case where more than one polygon might result.

My strategy was to create a graphicsPath object for each polygon, create a
region from each of those, then apply Region.Intersect().

Once I have done that, is it possible to find out the outline(s) of this
created intersection?

In particular, if I take two polygons whose intersection produces multiple
polygonal intersections, I would like to be able to have the result set of
points for each resultant polygon.

Thanks in advance.
Chris Hough

Re: Getting a path from the intersection of two regions Valerie Hough
10/27/2006 3:27:08 PM
Thanks for your reply - I had sort of reached that conclusion but was hoping
it was not true. The URL you suggested looks promising.

Re: Getting a path from the intersection of two regions Joergen Bech <jbech<NOSPAM> NO[at]SPAM
10/27/2006 9:12:55 PM

Region + GraphicsPath seem to be one-way streets only.
All the interesting stuff takes place in GDI+, below the
managed portion. GetRegionData and GetRegionScans
are not what you are looking for.

Have you looked at something like this library:
http://www.cs.man.ac.uk/~toby/alan/software/

Full source code and .Net wrappers available.
Perhaps you can get a bit closer to the required bits
and pieces that way?

/JB



On Fri, 27 Oct 2006 13:48:32 -0400, "Valerie Hough"
[quoted text, click to view]
AddThis Social Bookmark Button