110,535
社区成员
发帖
与我相关
我的任务
分享
{
using (Region RG = new Region()) {
Rectangle RC1 = default(Rectangle);
Rectangle RC2 = default(Rectangle);
RC1 = new Rectangle(10, 10, 100, 100);
RC2 = new Rectangle(20, 20, 80, 80);
using (Drawing2D.GraphicsPath GP = new Drawing2D.GraphicsPath()) {
GP.AddEllipse(RC1);
GP.AddEllipse(RC2);
RG.Intersect(GP);
}
using (Graphics G = this.CreateGraphics) {
G.FillRegion(Brushes.Red, RG);
}
}
}