Method DrawFilledEllipse
DrawFilledEllipse(Ellipse, Color32, Color32, double)
Fills the interior of the specified ellipse and then draws its outline, using a solid fill color and a solid stroke color with the given thickness.
public Canvas DrawFilledEllipse(Ellipse ellipse, Color32 fillColor, Color32 strokeColor, double strokeThickness = 1)
Parameters
ellipseEllipseThe ellipse to fill and outline.
fillColorColor32The interior fill color.
strokeColorColor32The outline stroke color.
strokeThicknessdoubleThe stroke thickness in pixels. Must be greater than zero. Defaults to 1.
Returns
Examples
var canvas = new Canvas(image);
canvas.DrawFilledEllipse(
Ellipse.Circle(100, 100, 50),
fillColor: new Color32(200, 230, 255),
strokeColor: new Color32(0, 0, 0),
strokeThickness: 2);
Exceptions
- ArgumentNullException
Thrown if
ellipseis null.
DrawFilledEllipse(Ellipse, Brush, Pen)
Fills the interior of the specified ellipse and then draws its outline, using the given brush and pen.
public Canvas DrawFilledEllipse(Ellipse ellipse, Brush brush, Pen pen)
Parameters
ellipseEllipseThe ellipse to fill and outline.
brushBrushThe brush that defines the fill color.
penPenThe pen that defines the stroke color, thickness, and alignment.
Returns
Examples
var brush = new Brush(new Color32(200, 230, 255));
var pen = new Pen(new Color32(0, 0, 0), 2);
var canvas = new Canvas(image);
canvas.DrawFilledEllipse(Ellipse.FromCenter(200, 150, 80, 50), brush, pen);
Exceptions
- ArgumentNullException
Thrown if
ellipse,brush, orpenis null.