Class ImageBrush
- Namespace
- nanoFramework.Presentation.Media
- Assembly
- nanoFramework.Graphics.dll
Represents a brush that paints an area with an image.
public sealed class ImageBrush : Brush
- Inheritance
-
ImageBrush
- Inherited Members
- Extension Methods
Constructors
ImageBrush(Bitmap)
Initializes a new instance of the ImageBrush class with the specified bitmap.
public ImageBrush(Bitmap bmp)
Parameters
bmp
BitmapThe source bitmap for the brush.
Fields
BitmapSource
Gets or sets the source bitmap for the brush.
public Bitmap BitmapSource
Field Value
Stretch
Gets or sets the stretch mode for the brush.
public Stretch Stretch
Field Value
Methods
RenderRectangle(Bitmap, Pen, int, int, int, int)
Renders a rectangle using the brush.
protected override void RenderRectangle(Bitmap bmp, Pen pen, int x, int y, int width, int height)
Parameters
bmp
BitmapThe bitmap to render the rectangle on.
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.