Class ImageBrush
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
sourceImageBrushOriginal instance of an image brush.
areaRectangleNew 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
sourceITextureOriginal instance of an image brush.
ImageBrush(ITexture, Rectangle)
Initializes a new instance of the ImageBrush class.
public ImageBrush(ITexture source, Rectangle area)
Parameters
Properties
DrawArea
Gets the area of the texture that is drawn using this ImageBrush instance.
public Rectangle DrawArea { get; }
Property Value
Size
Gets the size of an image.
public Size Size { get; }
Property Value
Source
Gets or sets the source texture used for this brush instance.
public ITexture Source { get; protected set; }
Property Value
Methods
Draw(IRenderContext, in TextureRenderingOptions)
Draws a brush on the specified render surface.
public virtual void Draw(IRenderContext context, in TextureRenderingOptions options)
Parameters
contextIRenderContextAn instance of the render context to draw brush with..
optionsTextureRenderingOptionsOptions to draw the brush with.