Gorgon
Show / Hide Table of Contents

Struct GorgonGlyphBrushInterpolator

An interpolation value used to weight the color blending in a gradient brush.

Implements
IEquatable<GorgonGlyphBrushInterpolator>
IComparable<GorgonGlyphBrushInterpolator>
Inherited Members
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetType()
Namespace: Gorgon.Graphics.Fonts
Assembly: Gorgon.Graphics.Fonts.dll
Syntax
public readonly struct GorgonGlyphBrushInterpolator : IEquatable<GorgonGlyphBrushInterpolator>, IComparable<GorgonGlyphBrushInterpolator>

Constructors

| Edit this page View Source

GorgonGlyphBrushInterpolator(float, GorgonColor)

Initializes a new instance of the GorgonGlyphBrushInterpolator struct.

Declaration
public GorgonGlyphBrushInterpolator(float weight, GorgonColor color)
Parameters
Type Name Description
float weight

The weight in the interpolation.

GorgonColor color

The color at the interpolation weight.

Fields

| Edit this page View Source

Color

Property to return the interpolation color.

Declaration
public readonly GorgonColor Color
Field Value
Type Description
GorgonColor
| Edit this page View Source

Weight

Property to return the interpolation weight.

Declaration
public readonly float Weight
Field Value
Type Description
float

Methods

| Edit this page View Source

CompareTo(GorgonGlyphBrushInterpolator)

Compares the current object with another object of the same type.

Declaration
public int CompareTo(GorgonGlyphBrushInterpolator other)
Parameters
Type Name Description
GorgonGlyphBrushInterpolator other

An object to compare with this object.

Returns
Type Description
int

A value that indicates the relative order of the objects being compared. The return value has the following meanings: Value Meaning Less than zero This object is less than the other parameter.Zero This object is equal to other. Greater than zero This object is greater than other.

| Edit this page View Source

Equals(GorgonGlyphBrushInterpolator)

Indicates whether the current object is equal to another object of the same type.

Declaration
public bool Equals(GorgonGlyphBrushInterpolator other)
Parameters
Type Name Description
GorgonGlyphBrushInterpolator other

An object to compare with this object.

Returns
Type Description
bool

true if the current object is equal to the other parameter; otherwise, false.

| Edit this page View Source

Equals(object)

Indicates whether the current object is equal to another object of the same type.

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
object obj

An object to compare with this object.

Returns
Type Description
bool

true if the current object is equal to the obj parameter; otherwise, false.

Overrides
ValueType.Equals(object)
| Edit this page View Source

GetHashCode()

Returns a hash code for this instance.

Declaration
public override int GetHashCode()
Returns
Type Description
int

A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.

Overrides
ValueType.GetHashCode()
| Edit this page View Source

ToString()

Returns a string that represents this instance.

Declaration
public override string ToString()
Returns
Type Description
string

A string that represents this instance.

Overrides
ValueType.ToString()

Operators

| Edit this page View Source

operator ==(GorgonGlyphBrushInterpolator, GorgonGlyphBrushInterpolator)

Performs an equality check on two instances.

Declaration
public static bool operator ==(GorgonGlyphBrushInterpolator left, GorgonGlyphBrushInterpolator right)
Parameters
Type Name Description
GorgonGlyphBrushInterpolator left

The left instance to compare.

GorgonGlyphBrushInterpolator right

The right instance to compare.

Returns
Type Description
bool

true if equal, false if not.

| Edit this page View Source

operator >(GorgonGlyphBrushInterpolator, GorgonGlyphBrushInterpolator)

Performs a greater than test on two instances.

Declaration
public static bool operator >(GorgonGlyphBrushInterpolator left, GorgonGlyphBrushInterpolator right)
Parameters
Type Name Description
GorgonGlyphBrushInterpolator left

The left instance to compare.

GorgonGlyphBrushInterpolator right

The right instance to compare.

Returns
Type Description
bool

true if left is greater than right, false if not.

| Edit this page View Source

operator >=(GorgonGlyphBrushInterpolator, GorgonGlyphBrushInterpolator)

Performs a greater than or equal to than test on two instances.

Declaration
public static bool operator >=(GorgonGlyphBrushInterpolator left, GorgonGlyphBrushInterpolator right)
Parameters
Type Name Description
GorgonGlyphBrushInterpolator left

The left instance to compare.

GorgonGlyphBrushInterpolator right

The right instance to compare.

Returns
Type Description
bool

true if left is greater than or equal to right, false if not.

| Edit this page View Source

operator !=(GorgonGlyphBrushInterpolator, GorgonGlyphBrushInterpolator)

Performs an inequality check on two instances.

Declaration
public static bool operator !=(GorgonGlyphBrushInterpolator left, GorgonGlyphBrushInterpolator right)
Parameters
Type Name Description
GorgonGlyphBrushInterpolator left

The left instance to compare.

GorgonGlyphBrushInterpolator right

The right instance to compare.

Returns
Type Description
bool

true if not equal, false if equal.

| Edit this page View Source

operator <(GorgonGlyphBrushInterpolator, GorgonGlyphBrushInterpolator)

Performs a less than test on two instances.

Declaration
public static bool operator <(GorgonGlyphBrushInterpolator left, GorgonGlyphBrushInterpolator right)
Parameters
Type Name Description
GorgonGlyphBrushInterpolator left

The left instance to compare.

GorgonGlyphBrushInterpolator right

The right instance to compare.

Returns
Type Description
bool

true if left is less than right, false if not.

| Edit this page View Source

operator <=(GorgonGlyphBrushInterpolator, GorgonGlyphBrushInterpolator)

Performs a less or equal to than test on two instances.

Declaration
public static bool operator <=(GorgonGlyphBrushInterpolator left, GorgonGlyphBrushInterpolator right)
Parameters
Type Name Description
GorgonGlyphBrushInterpolator left

The left instance to compare.

GorgonGlyphBrushInterpolator right

The right instance to compare.

Returns
Type Description
bool

true if left is less than or equal to right, false if not.

Implements

IEquatable<T>
IComparable<T>

Extension Methods

GorgonNullExtensions.AsNullable<T>(object)
GorgonNullExtensions.IfNull<T>(object, T)
GorgonNullExtensions.IsNull(object)
  • Edit this page
  • View Source
In this article
Back to top Copyright 2023 - Licensed under the MIT license by Michael Winsor (Tape_Worm).
Send comments on this topic to the author