Method FillPolygon
FillPolygon(Polygon, Color32)
Fills the interior of the specified polygon with a solid color using the even-odd fill rule.
public Canvas FillPolygon(Polygon polygon, Color32 color)
Parameters
Returns
Examples
var triangle = Polygon.Regular(new Point(100, 100), 50, 3);
var canvas = new Canvas(image);
canvas.FillPolygon(triangle, new Color32(0, 180, 0));
Exceptions
- ArgumentNullException
Thrown if
polygonis null.
FillPolygon(Polygon, Brush)
Fills the interior of the specified polygon using the given brush and the even-odd fill rule.
public Canvas FillPolygon(Polygon polygon, Brush brush)
Parameters
Returns
Examples
var hexagon = Polygon.Regular(new Point(200, 200), 80, 6);
var brush = new Brush(new Color32(0, 180, 0));
var canvas = new Canvas(image);
canvas.FillPolygon(hexagon, brush);
Exceptions
- ArgumentNullException
Thrown if
polygonorbrushis null.