我们知道,在GDI+中,两个图形路径(GraphicsPath)的区域(Region)合并,我们可以采用Region.Union方法进行。但使用它之后,我们再想取得合并后的Region的GraphicsPath却变得不再可能。比如下图1红色部分:
图1 合并GraphicsPath后想要达到的效果
它由两个椭圆共同组成:
Rectangle rect1 = new Rectangle(100, 100, 178, 178);Rectangle rect2 = new Rectangle(230, 100, 178, 178);
GraphicsPath gp = new GraphicsPath(FillMode.Winding);
gp.AddEllipse(rect1);
gp.AddEllipse(rect2);
Bitmap bmp = new Bitmap(520, 520);
Graphics g = Graphics.FromImage(bmp);
g.CompositingQuality = CompositingQuality.HighQuality;
g.InterpolationMode = Interpo