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
ColorThe color of the brush.
Fields
Color
Gets or sets the color of this brush.
public Color Color
Field Value
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
BitmapThe bitmap on which to render the ellipse.
pen
PenThe pen used to outline the ellipse.
x
intThe x-coordinate of the center of the ellipse.
y
intThe y-coordinate of the center of the ellipse.
xRadius
intThe horizontal radius of the ellipse.
yRadius
intThe 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
BitmapThe bitmap on which to render the polygon.
outline
PenThe 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
BitmapThe bitmap on which to render the rectangle.
pen
PenThe pen used to outline the rectangle.
x
intThe x-coordinate of the upper-left corner of the rectangle.
y
intThe y-coordinate of the upper-left corner of the rectangle.
width
intThe width of the rectangle.
height
intThe height of the rectangle.