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
colorColorThe 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
bmpBitmapThe bitmap on which to render the ellipse.
penPenThe pen used to outline the ellipse.
xintThe x-coordinate of the center of the ellipse.
yintThe y-coordinate of the center of the ellipse.
xRadiusintThe horizontal radius of the ellipse.
yRadiusintThe 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
bmpBitmapThe bitmap on which to render the polygon.
outlinePenThe pen used to outline the polygon.
ptsint[]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
bmpBitmapThe bitmap on which to render the rectangle.
penPenThe pen used to outline the rectangle.
xintThe x-coordinate of the upper-left corner of the rectangle.
yintThe y-coordinate of the upper-left corner of the rectangle.
widthintThe width of the rectangle.
heightintThe height of the rectangle.