public FillClosedCurve ( |
||
brush | ||
points | Point | |
return | void |
Point[] points = { new Point(50, 50), new Point(100, 25), new Point(200, 5), new Point(250, 50), new Point(300, 100), new Point(350, 200), new Point(250, 250), new Point(200, 300) }; SolidBrush brush = new SolidBrush(Color.Red); graphics.FillClosedCurve(brush, points, FillMode.Alternate);
PointF[] points = { new PointF(50.0F, 50.0F), new PointF(100.0F, 25.0F), new PointF(200.0F, 5.0F), new PointF(250.0F, 50.0F), new PointF(300.0F, 100.0F), new PointF(350.0F, 200.0F), new PointF(250.0F, 250.0F), new PointF(200.0F, 300.0F), new PointF(150.0F, 350.0F) }; HatchBrush brush = new HatchBrush(HatchStyle.LargeConfetti, Color.DarkGray, Color.White); graphics.FillClosedCurve(brush, points, FillMode.Winding);This code creates an array of PointF objects and a HatchBrush with the large confetti pattern. It then fills the closed curve defined by the points using the winding fill mode. The System.Drawing.Graphics namespace belongs to the System.Drawing assembly.