Table of Contents

Class ImageBrush

Namespace
Icy.Rendering.Brushes
Assembly
IcyUI.dll

Represents a simple brush for textures rendering.

public class ImageBrush : IImage, IBrush
Inheritance
ImageBrush
Implements
Derived
Inherited Members
Extension Methods

Constructors

ImageBrush(ImageBrush, Rectangle)

Initializes a new instance of the ImageBrush class.

public ImageBrush(ImageBrush source, Rectangle area)

Parameters

source ImageBrush

Original instance of an image brush.

area Rectangle

New source area of an original image brush that is used for drawing.

ImageBrush(ITexture)

Initializes a new instance of the ImageBrush class.

public ImageBrush(ITexture source)

Parameters

source ITexture

Original instance of an image brush.

ImageBrush(ITexture, Rectangle)

Initializes a new instance of the ImageBrush class.

public ImageBrush(ITexture source, Rectangle area)

Parameters

source ITexture

Texture instance to use.

area Rectangle

Area of the texture to draw.

Properties

DrawArea

Gets the area of the texture that is drawn using this ImageBrush instance.

public Rectangle DrawArea { get; }

Property Value

Rectangle

Size

Gets the size of an image.

public Size Size { get; }

Property Value

Size

Source

Gets or sets the source texture used for this brush instance.

public ITexture Source { get; protected set; }

Property Value

ITexture

Methods

Draw(IRenderContext, in TextureRenderingOptions)

Draws a brush on the specified render surface.

public virtual void Draw(IRenderContext context, in TextureRenderingOptions options)

Parameters

context IRenderContext

An instance of the render context to draw brush with..

options TextureRenderingOptions

Options to draw the brush with.