1、区域(Region)排除
1 CRect rt; 2 GetClientRect(&rt); 3 4 GraphicsPath pa; 5 pa.AddEllipse(0, 0, rt.Width(), rt.Height()); 6 Region rg(Rect(0, 0, rt.Width(), rt.Height())); 7 rg.Exclude(&pa); 8 graphics.FillRegion(&SolidBrush(Color(255, 0, 0)), &rg);
2、路径叠加透明
1 GraphicsPath pa; 2 pa.AddRectangle(Rect(0, 0, rt.Width(), rt.Height())); 3 pa.AddEllipse(Rect(0, 0, rt.Width(), rt.Height())); 4 graphics.FillPath(&SolidBrush(Color(255, 0, 0)), &pa);
注:绘图质量在设置后,区域排除条件下,绘图质量没有效果,待指点
标签:rt,Region,Height,Width,pa,GraphicsPath,GDI From: https://www.cnblogs.com/missyou0813/p/17580315.html