Method FillQuadrilateral
FillQuadrilateral(Quadrilateral, Color32)
Fills the interior of the specified quadrilateral with a solid color.
public Canvas FillQuadrilateral(Quadrilateral quad, Color32 color)
Parameters
quadQuadrilateralThe four-cornered polygon to fill.
colorColor32The fill color.
Returns
Examples
var quad = new Quadrilateral(
new Point(50, 10), new Point(250, 10),
new Point(280, 110), new Point(20, 110));
var canvas = new Canvas(image);
canvas.FillQuadrilateral(quad, new Color32(0, 180, 0));
Exceptions
- ArgumentNullException
Thrown if
quadis null.
FillQuadrilateral(Quadrilateral, Brush)
Fills the interior of the specified quadrilateral using the given brush.
public Canvas FillQuadrilateral(Quadrilateral quad, Brush brush)
Parameters
quadQuadrilateralThe four-cornered polygon to fill.
brushBrushThe brush that defines the fill color.
Returns
Examples
var quad = new Quadrilateral(
new Point(50, 10), new Point(250, 10),
new Point(280, 110), new Point(20, 110));
var brush = new Brush(new Color32(0, 180, 0));
var canvas = new Canvas(image);
canvas.FillQuadrilateral(quad, brush);
Exceptions
- ArgumentNullException
Thrown if
quadorbrushis null.