Skip to main content

ImmutableSolidColorBrush Class

Definition​

Assembly:Avalonia.Base
Package:Avalonia

Fills an area with a solid color.

public class ImmutableSolidColorBrush

Inheritance: object -> ImmutableSolidColorBrush

Implements: IBrush, IImmutableBrush, IImmutableSolidColorBrush, ISolidColorBrush, IEquatable<ImmutableSolidColorBrush>

Constructors​

ImmutableSolidColorBrush overloads​

ImmutableSolidColorBrush Constructor​

Initializes a new instance of the Avalonia.Media.Immutable.ImmutableSolidColorBrush class.

public ImmutableSolidColorBrush(Avalonia.Media.Color color, double opacity, Avalonia.Media.Immutable.ImmutableTransform transform)
Parameters​

color Avalonia.Media.Color

The color to use.

opacity double

The opacity of the brush.

transform Avalonia.Media.Immutable.ImmutableTransform

The transform of the brush.

ImmutableSolidColorBrush Constructor​

Initializes a new instance of the Avalonia.Media.Immutable.ImmutableSolidColorBrush class.

public ImmutableSolidColorBrush(Avalonia.Media.Color color, double opacity, Avalonia.Media.Immutable.ImmutableTransform transform, Avalonia.Media.Immutable.ImmutableTransform relativeTransform)
Parameters​

color Avalonia.Media.Color

The color to use.

opacity double

The opacity of the brush.

transform Avalonia.Media.Immutable.ImmutableTransform

The transform of the brush.

relativeTransform Avalonia.Media.Immutable.ImmutableTransform

The transform of the brush in the relative coordinate space of the area being painted, applied before transform.

ImmutableSolidColorBrush Constructor​

Initializes a new instance of the Avalonia.Media.Immutable.ImmutableSolidColorBrush class.

public ImmutableSolidColorBrush(Avalonia.Media.ISolidColorBrush source)
Parameters​

source Avalonia.Media.ISolidColorBrush

The brush from which this brush's properties should be copied.

ImmutableSolidColorBrush Constructor​

Initializes a new instance of the Avalonia.Media.Immutable.ImmutableSolidColorBrush class.

public ImmutableSolidColorBrush(uint color)
Parameters​

color uint

The color to use.

Methods​

NameDescription
Equals (2 overloads)No summary available.
GetHashCodeNo summary available.
ToStringReturns a string representation of the brush.

Equals overloads​

Equals Method​

public bool Equals(Avalonia.Media.Immutable.ImmutableSolidColorBrush other)
Parameters​

other Avalonia.Media.Immutable.ImmutableSolidColorBrush

Returns​

bool

Equals Method​

public bool Equals(object obj)
Parameters​

obj object

Returns​

bool

GetHashCode Method​

public int GetHashCode()

Returns​

int

ToString Method​

Returns a string representation of the brush.

public string ToString()

Returns​

string

A string representation of the brush.

Properties​

NameDescription
ColorGets the color of the brush.
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 transform origin of the brush

Color Property​

Gets the color of the brush.

public Avalonia.Media.Color Color { get; set; }

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 transform origin of the brush

public Avalonia.RelativePoint TransformOrigin { get; set; }