Method FillRoundedRectangle
FillRoundedRectangle(RoundedRectangle, Color32)
Fills the interior of the specified rounded rectangle with a solid color.
public Canvas FillRoundedRectangle(RoundedRectangle roundedRect, Color32 color)
Parameters
roundedRectRoundedRectangleThe rounded rectangle to fill.
colorColor32The fill color.
Returns
Examples
var rr = RoundedRectangle.FromSize(10, 10, 200, 100, cornerRadius: 15);
var canvas = new Canvas(image);
canvas.FillRoundedRectangle(rr, new Color32(0, 120, 215));
Exceptions
- ArgumentNullException
Thrown if
roundedRectis null.
FillRoundedRectangle(RoundedRectangle, Brush)
Fills the interior of the specified rounded rectangle using the given brush.
public Canvas FillRoundedRectangle(RoundedRectangle roundedRect, Brush brush)
Parameters
roundedRectRoundedRectangleThe rounded rectangle to fill.
brushBrushThe brush that defines the fill color.
Returns
Examples
var rr = RoundedRectangle.FromSize(10, 10, 200, 100, cornerRadius: 15);
var brush = new Brush(new Color32(0, 120, 215));
var canvas = new Canvas(image);
canvas.FillRoundedRectangle(rr, brush);
Exceptions
- ArgumentNullException
Thrown if
roundedRectorbrushis null.