Table of Contents

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 Bitmap

The source bitmap for the brush.

Fields

BitmapSource

Gets or sets the source bitmap for the brush.

public Bitmap BitmapSource

Field Value

Bitmap

Stretch

Gets or sets the stretch mode for the brush.

public Stretch Stretch

Field Value

Stretch

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 Bitmap

The bitmap to render the rectangle on.

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.