ColorStop Struct

A color of a paint of a color glyph: a stop of a color line, or the color of a solid paint.

public readonly struct ColorStop : IEquatable<ColorStop>
Implements

Constructors

NameDescription
ColorStop(double, double, double, double, double, bool)A color of a paint of a color glyph: a stop of a color line, or the color of a solid paint.

ColorStop(double, double, double, double, double, bool)

A color of a paint of a color glyph: a stop of a color line, or the color of a solid paint.

public ColorStop(double Offset, double Red, double Green, double Blue, double Alpha, bool IsForeground)

Parameters

Offset double
The position of the stop on its color line, from 0 to 1 once the line is normalized.
Red double
The red component, from 0 to 1, not multiplied by the alpha.
Green double
The green component.
Blue double
The blue component.
Alpha double
The opacity, from 0 to 1.
IsForeground bool
Whether the color is the one of the text: its components are then those of the brush the text is drawn with, and Alpha multiplies its opacity.

Properties

NameDescription
AlphaThe opacity, from 0 to 1.
BlueThe blue component.
GreenThe green component.
IsForegroundWhether the color is the one of the text: its components are then those of the brush the text is drawn with, and Alpha multiplies its opacity.
OffsetThe position of the stop on its color line, from 0 to 1 once the line is normalized.
RedThe red component, from 0 to 1, not multiplied by the alpha.

The opacity, from 0 to 1.

public double Alpha { get; init; }

Property value

double

The blue component.

public double Blue { get; init; }

Property value

double

The green component.

public double Green { get; init; }

Property value

double

IsForeground

ColorStop.cs

Whether the color is the one of the text: its components are then those of the brush the text is drawn with, and Alpha multiplies its opacity.

public bool IsForeground { get; init; }

Property value

bool

The position of the stop on its color line, from 0 to 1 once the line is normalized.

public double Offset { get; init; }

Property value

double

The red component, from 0 to 1, not multiplied by the alpha.

public double Red { get; init; }

Property value

double

Methods

NameDescription
Deconstruct(double, double, double, double, double, bool)
Equals(ColorStop)
Equals(object)
GetHashCode()
ToString()

Deconstruct(double, double, double, double, double, bool)

public void Deconstruct(out double Offset, out double Red, out double Green, out double Blue, out double Alpha, out bool IsForeground)

Parameters

Offset double
Red double
Green double
Blue double
Alpha double
IsForeground bool

No documentation is available.

Equals overloads

Equals(ColorStop)

public bool Equals(ColorStop other)
Parameters
other ColorStop
Returns

bool

No documentation is available.

Equals(object)

public override bool Equals(object obj)
Parameters
obj object
Returns

bool

No documentation is available.

GetHashCode()

public override int GetHashCode()

Returns

int

No documentation is available.

ToString()

public override string ToString()

Returns

string

No documentation is available.

Operators

NameDescription
operator ==(ColorStop, ColorStop)
operator !=(ColorStop, ColorStop)

operator ==(ColorStop, ColorStop)

public static bool operator ==(ColorStop left, ColorStop right)

Parameters

left ColorStop
right ColorStop

Returns

bool

No documentation is available.

operator !=(ColorStop, ColorStop)

public static bool operator !=(ColorStop left, ColorStop right)

Parameters

left ColorStop
right ColorStop

Returns

bool

No documentation is available.