using (SolidBrush brush = new SolidBrush(Color.FromArgb(125, Color.Black))) { GraphicsPath path = new GraphicsPath(); path.AddRectangle(pnlCut.Bounds);//添加要填充的矩形 Region region = new Region(path); region.Exclude(_cellRect);//除去中间不需要填充的矩形 g.FillRegion(brush, region); }
标签:C#,region,中间,brush,new,path,矩形 From: https://www.cnblogs.com/dachuang/p/17494410.html