TextureBrush

BrushReferences
public sealed class TextureBrush : Brush, ITransformBrush
Defines a brush with an image texture for use with Graphics fill operations

Constructors

TextureBrush

#
public TextureBrush(Image image, float opacity = 1)
Initializes a new instance of the TextureBrush class.
image (Image)Image for the brush
opacity (float = 1)Opacity of the texture to apply to the brush when painting

Properties

ControlObject

public object ControlObject { get; set; }
Gets or sets the control object for this widget
inherited fromBrush

Handler

#
public override object Handler { get; }
Gets the platform handler object for the widget

Image

#
public Image Image { get; }
Gets the texture's image to paint with

Instantiator

#
public static Func<Image, float, TextureBrush> Instantiator { get; }
obsolete: Use new TextureBrush() instead
Gets an instantiator for the texture brush to create instances
Remarks: This can be used to instantiate texture brushes when creating many brushes to minimize overhead

Opacity

#
public float Opacity { get; set; }
Gets or sets the opacity of the brush texture

Transform

#
public IMatrix Transform { get; set; }
Gets or sets the transform for this brush

Methods

Dispose

public void Dispose()
Releases all resource used by the Brush object.
inherited fromBrush
Remarks: Call Brush.Dispose() when you are finished using the Brush. The Brush.Dispose() method leaves the Brush in an unusable state. After calling Brush.Dispose(), you must release all references to the Brush so the garbage collector can reclaim the memory that the Brush was occupying.

Dispose

protected virtual void Dispose(bool disposing)
Disposes the brush
inherited fromBrush
disposing (bool)If set to true dispose was called explicitly, otherwise specify false if calling from a finalizer