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

    Show / Hide Table of Contents

    PdfShadingColor Struct

    Namespace:
    GemBox.Pdf.Content.Patterns
    Assembly:
    GemBox.Pdf.dll

    Describes the location and color of a transition point in a shading.

    Use this structure to describe the colors in a PdfAxialShading or PdfRadialShading.

    Two PdfShadingColors are converted to a PdfExponentialInterpolationFunction and more than two are converted to a PdfStitchingFunction (stitching two or more PdfExponentialInterpolationFunctions) that is then set to the Function or the Function.

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

    Constructors

    PdfShadingColor(PdfColor, Double)

    Initializes a new instance of the PdfShadingColor structure with the specified color and offset.

    • C#
    • VB.NET
    public PdfShadingColor(PdfColor color, double offset)
    Public Sub New(color As PdfColor, offset As Double)
    Parameters
    color
    PdfColor

    The color value.

    offset
    System.Double

    The location in the shading where the shading color is placed.

    Properties

    Color

    Gets the color.

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

    The color.

    Offset

    Gets the location of the shading color within the shading vector.

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

    The relative location of this shading color along the shading vector.

    Remarks

    A value of 0.0 specifies that the color is positioned at the beginning of the shading vector, while a value of 1.0 specifies that the color is positioned at the end of the shading vector.

    Methods

    Equals(PdfShadingColor)

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

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

    The other shading color to compare with this shading color instance.

    Returns
    System.Boolean

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

    Equals(Object)

    Determines whether the specified System.Object is equal to this PdfShadingColor 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 shading color instance.

    Returns
    System.Boolean

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

    Overrides
    System.ValueType.Equals(System.Object)

    GetHashCode()

    Returns a hash code for this PdfShadingColor 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 PdfShadingColor instance.

    Overrides
    System.ValueType.GetHashCode()

    ToString()

    Returns a System.String that represents this PdfShadingColor instance.

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

    A System.String that represents this PdfShadingColor 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(PdfShadingColor, PdfShadingColor)

    Determines whether first and second PdfShadingColors are equal.

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

    The first shading color.

    second
    PdfShadingColor

    The second shading color.

    Returns
    System.Boolean

    true if first and second shading colors are equal; otherwise, false.

    Inequality(PdfShadingColor, PdfShadingColor)

    Determines whether first and second PdfShadingColors are not equal.

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

    The first shading color.

    second
    PdfShadingColor

    The second shading color.

    Returns
    System.Boolean

    true if first and second shading colors are not equal; otherwise, false.

    Implements

    System.IEquatable<T>
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.