GemBox.Document
  • Overview
  • Examples
  • Free version
  • Support
  • Pricelist

    Show / Hide Table of Contents

    GradientStop Struct

    Namespace:
    GemBox.Document.Drawing
    Assembly:
    GemBox.Document.dll

    Represents a single gradient stop in a gradient fill.

    • C#
    • VB.NET
    public readonly struct GradientStop : IEquatable<GradientStop>
    Public Structure GradientStop
        Implements IEquatable(Of GradientStop)
    Implements
    System.IEquatable<GradientStop>

    Constructors

    GradientStop(Double, Color)

    Initializes a new instance of the GradientStop class with the specified position and color.

    • C#
    • VB.NET
    public GradientStop(double position, Color color)
    Public Sub New(position As Double, color As Color)
    Parameters
    position
    System.Double

    The position in the gradient where the gradient stop is placed. Value must be between 0 and 1.

    color
    Color

    The color value of the gradient stop.

    Properties

    Color

    Specifies the color of the gradient.

    • C#
    • VB.NET
    public readonly Color Color { get; }
    Public ReadOnly Property Color As Color
    Property Value
    Color

    The color of the gradient.

    Position

    Specifies where this gradient stop should appear in the color band. This position is expressed as a percentage from 0 to 1.

    • C#
    • VB.NET
    public readonly double Position { get; }
    Public ReadOnly Property Position As Double
    Property Value
    System.Double

    The position of the gradient stop.

    Methods

    Equals(GradientStop)

    Determines whether the other GradientStop is equal to this GradientStop instance.

    • C#
    • VB.NET
    public readonly bool Equals(GradientStop other)
    Public Function Equals(other As GradientStop) As Boolean
    Parameters
    other
    GradientStop

    The other gradient stop to compare with this gradient stop instance.

    Returns
    System.Boolean

    true if the other GradientStop is equal to this GradientStop instance; otherwise, false.

    Equals(Object)

    Determines whether the specified System.Object is equal to this GradientStop instance.

    • C#
    • VB.NET
    public override readonly bool Equals(object obj)
    Public Overrides Function Equals(obj As Object) As Boolean
    Parameters
    obj
    System.Object

    The System.Object to compare with this gradient stop instance.

    Returns
    System.Boolean

    true if the specified System.Object is a GradientStop and is equal to this GradientStop instance; otherwise, false.

    Overrides
    System.ValueType.Equals(System.Object)

    GetHashCode()

    Returns a hash code for this GradientStop instance.

    • C#
    • VB.NET
    public override readonly int GetHashCode()
    Public Overrides Function GetHashCode As Integer
    Returns
    System.Int32

    An integer value that specifies a hash value for this GradientStop instance.

    Overrides
    System.ValueType.GetHashCode()

    ToString()

    Returns a System.String that represents this GradientStop instance.

    • C#
    • VB.NET
    public override readonly string ToString()
    Public Overrides Function ToString As String
    Returns
    System.String

    A System.String that represents this GradientStop instance.

    Overrides
    System.ValueType.ToString()
    Remarks

    This method should be used primarily for debugging purposes and should be considered volatile (format of its return value might change in future versions).

    Operators

    Equality(GradientStop, GradientStop)

    Determines whether first and second GradientStops are equal.

    • C#
    • VB.NET
    public static bool operator ==(GradientStop first, GradientStop second)
    Public Shared Operator =(first As GradientStop, second As GradientStop) As Boolean
    Parameters
    first
    GradientStop

    The first gradient stop.

    second
    GradientStop

    The second gradient stop.

    Returns
    System.Boolean

    true if first and second gradient stops are equal; otherwise, false.

    Inequality(GradientStop, GradientStop)

    Determines whether first and second GradientStops are not equal.

    • C#
    • VB.NET
    public static bool operator !=(GradientStop first, GradientStop second)
    Public Shared Operator <>(first As GradientStop, second As GradientStop) As Boolean
    Parameters
    first
    GradientStop

    The first gradient stop.

    second
    GradientStop

    The second gradient stop.

    Returns
    System.Boolean

    true if first and second gradient stops are not equal; otherwise, false.

    Implements

    System.IEquatable<T>
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.