Struct ShadingColorStop
A color stop for a gradient shading, consisting of a position and color.
Implements
Inherited Members
Namespace: DRIT.Pdf.Content
Assembly: DRIT.Pdf.dll
Syntax
public readonly struct ShadingColorStop : IEquatable<ShadingColorStop>
Constructors
ShadingColorStop(double, PdfColor)
Initializes a color stop.
Declaration
public ShadingColorStop(double position, PdfColor color)
Parameters
| Type | Name | Description |
|---|---|---|
| double | position | |
| PdfColor | color |
Properties
Color
Gets the color at this position.
Declaration
public PdfColor Color { get; }
Property Value
| Type | Description |
|---|---|
| PdfColor |
Position
Gets the position in the gradient domain (typically 0.0 to 1.0).
Declaration
public double Position { get; }
Property Value
| Type | Description |
|---|---|
| double |
Methods
Equals(ShadingColorStop)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(ShadingColorStop other)
Parameters
| Type | Name | Description |
|---|---|---|
| ShadingColorStop | other | An object to compare with this object. |
Returns
| Type | Description |
|---|---|
| bool | true if the current object is equal to the |
Equals(object?)
Indicates whether this instance and a specified object are equal.
Declaration
public override bool Equals(object? obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj | The object to compare with the current instance. |
Returns
| Type | Description |
|---|---|
| bool | true if |
Overrides
GetHashCode()
Returns the hash code for this instance.
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| int | A 32-bit signed integer that is the hash code for this instance. |
Overrides
Operators
operator ==(ShadingColorStop, ShadingColorStop)
Equality operator.
Declaration
public static bool operator ==(ShadingColorStop a, ShadingColorStop b)
Parameters
| Type | Name | Description |
|---|---|---|
| ShadingColorStop | a | |
| ShadingColorStop | b |
Returns
| Type | Description |
|---|---|
| bool |
operator !=(ShadingColorStop, ShadingColorStop)
Inequality operator.
Declaration
public static bool operator !=(ShadingColorStop a, ShadingColorStop b)
Parameters
| Type | Name | Description |
|---|---|---|
| ShadingColorStop | a | |
| ShadingColorStop | b |
Returns
| Type | Description |
|---|---|
| bool |