Table of Contents

Class SolidColorBrush

Namespace
nanoFramework.Presentation.Media
Assembly
nanoFramework.Graphics.dll

A brush of a single, solid color.

public sealed class SolidColorBrush : Brush
Inheritance
SolidColorBrush
Inherited Members
Extension Methods

Constructors

SolidColorBrush(Color)

Initializes a new instance of the SolidColorBrush class with the specified color.

public SolidColorBrush(Color color)

Parameters

color Color

The color of the brush.

Fields

Color

Gets or sets the color of this brush.

public Color Color

Field Value

Color

Methods

RenderEllipse(Bitmap, Pen, int, int, int, int)

Renders an ellipse with the specified dimensions and color.

protected override void RenderEllipse(Bitmap bmp, Pen pen, int x, int y, int xRadius, int yRadius)

Parameters

bmp Bitmap

The bitmap on which to render the ellipse.

pen Pen

The pen used to outline the ellipse.

x int

The x-coordinate of the center of the ellipse.

y int

The y-coordinate of the center of the ellipse.

xRadius int

The horizontal radius of the ellipse.

yRadius int

The vertical radius of the ellipse.

RenderPolygon(Bitmap, Pen, int[])

Renders a polygon with the specified points and color. Basic algorithm uses scan lines to fill the polygon. No multiplication or division is needed, neither is floating point calculation.

protected override void RenderPolygon(Bitmap bmp, Pen outline, int[] pts)

Parameters

bmp Bitmap

The bitmap on which to render the polygon.

outline Pen

The pen used to outline the polygon.

pts int[]

The array of points that make up the polygon.

RenderRectangle(Bitmap, Pen, int, int, int, int)

Renders a rectangle with the specified dimensions and color.

protected override void RenderRectangle(Bitmap bmp, Pen pen, int x, int y, int width, int height)

Parameters

bmp Bitmap

The bitmap on which to render the rectangle.

pen Pen

The pen used to outline the rectangle.

x int

The x-coordinate of the upper-left corner of the rectangle.

y int

The y-coordinate of the upper-left corner of the rectangle.

width int

The width of the rectangle.

height int

The height of the rectangle.