Region to Path or Path Union

XL Jedi

Active member
Joined
Apr 2, 2007
Messages
44
Location
Florida
Programming Experience
10+
Ya know, the GDI is nice; and at the same time extremely aggravating!
Case in point...

I have two polygons that I wish to add together (union). The polygons exist in paths defined by point arrays. So far so good...

Paths do not have methods for things like: union, intercept, xor, etc. The good news is Regions do! I can define a region by setting it's Points property equal to the PathPoints of my polygon shapes. Excellent!

Now I perform the union of regions, and presto!
I have my new polygon expressed as a region.

But now if I fill the resulting region, I can't apply Anti-Aliasing (the way I can when drawing a path). So I think, "There must be a simple way to hand the DataPoints of the Region back to a Path" and NOTHING!

I can't believe that I can define a region with datapoints, but there's no way to either:
a) return region data points back to a path, or...
b) perform union, intersect, xor ops on paths directly!

Now I gotta figure out how to code polygon addition and (I guess) exclude the points that overlap. :(

It doesn't seem like I should have to build something like this; am I missing something?
 
Last edited:
Back
Top