PdfShadingColor Struct
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.
public readonly struct PdfShadingColor : IEquatable<PdfShadingColor>
Public Structure PdfShadingColor
Implements IEquatable(Of PdfShadingColor)
Implements
Constructors
PdfShadingColor(PdfColor, Double)
Initializes a new instance of the PdfShadingColor structure with the specified color and offset.
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.
Property Value
The color.
Offset
Gets the location of the shading color within the shading vector.
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.
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.
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
GetHashCode()
Returns a hash code for this PdfShadingColor instance.
Returns
- System.Int32
An integer value that specifies a hash value for this PdfShadingColor instance.
Overrides
ToString()
Returns a System.String that represents this PdfShadingColor instance.
Returns
- System.String
A System.String that represents this PdfShadingColor instance.
Overrides
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.
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.
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.