Table of Contents

Method FillRoundedRectangle

Namespace
LMKit.Graphics.Drawing
Assembly
LM-Kit.NET.dll

FillRoundedRectangle(RoundedRectangle, Color32)

Fills the interior of the specified rounded rectangle with a solid color.

public Canvas FillRoundedRectangle(RoundedRectangle roundedRect, Color32 color)

Parameters

roundedRect RoundedRectangle

The rounded rectangle to fill.

color Color32

The fill color.

Returns

Canvas

This Canvas instance for fluent chaining.

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 roundedRect is null.

FillRoundedRectangle(RoundedRectangle, Brush)

Fills the interior of the specified rounded rectangle using the given brush.

public Canvas FillRoundedRectangle(RoundedRectangle roundedRect, Brush brush)

Parameters

roundedRect RoundedRectangle

The rounded rectangle to fill.

brush Brush

The brush that defines the fill color.

Returns

Canvas

This Canvas instance for fluent chaining.

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 roundedRect or brush is null.