Skip to main content

IBrush Interface

Definition​

Namespace:Avalonia.Media
Assembly:Avalonia.Base
Package:Avalonia
Source:IBrush.cs

Describes how an area is painted.

public interface IBrush

Properties​

NameDescription
OpacityGets the opacity of the brush.
RelativeTransformGets the transform applied in the relative coordinate space of the area being painted: the unit square (0,0)-(1,1) maps onto the painted bounds, this transform applies inside that space, and Avalonia.Media.IBrush.Transform follows in target space. It lets a single brush express a bounds-dependent transform - an SVG gradientTransform in objectBoundingBox units, for example - without baking any one consumer's bounds into a matrix.
TransformGets the transform of the brush.
TransformOriginGets the origin of the brushes Avalonia.Media.IBrush.Transform

Opacity Property​

Gets the opacity of the brush.

public double Opacity { get; set; }

RelativeTransform Property​

Gets the transform applied in the relative coordinate space of the area being painted: the unit square (0,0)-(1,1) maps onto the painted bounds, this transform applies inside that space, and Avalonia.Media.IBrush.Transform follows in target space. It lets a single brush express a bounds-dependent transform - an SVG gradientTransform in objectBoundingBox units, for example - without baking any one consumer's bounds into a matrix.

public Avalonia.Media.ITransform RelativeTransform { get; set; }

Transform Property​

Gets the transform of the brush.

public Avalonia.Media.ITransform Transform { get; set; }

TransformOrigin Property​

Gets the origin of the brushes Avalonia.Media.IBrush.Transform

public Avalonia.RelativePoint TransformOrigin { get; set; }