views:

432

answers:

1

How can I intersect two (.NET) GraphicsPath objects?

+2  A: 

Are you trying to get the area enclosed by two different paths? That is a Region, not a path:

var rgn1 = new Region(path1);
var intersection = rgn1.Intersect(path2);
rgn1.Dispose();

If that is not what you mean, you will have to provide more information.

Dour High Arch
Already tried that. Unfortunately when I try to fill that rectangle I get some strange visual glitches. Anyway, thank you for your answer.
Yordan Pavlov
What are you "filling"? And Regions are not rectangles. Please show the source code.
Dour High Arch
Regions don't support Antialiasing - that is what you might see.
Patrick Klug