cete.dynamicpdf.gradient
Gradient
- Namespace: ceTe.DynamicPDF
- Assemblies: ceTe.DynamicPDF.40.dll
Represents a gradient pattern.
public class Gradient : Pattern
Public Class Gradient
Inherits Pattern
Inheritance: Object → Color → Pattern → Gradient
Derived: AutoGradient
Licensing
This class is a DynamicPDF Generator Professional Edition feature. One of the following licenses is required for non-evaluation usage:
- DynamicPDF Generator for .NET Professional Edition
- DynamicPDF Generator for .NET Enterprise Edition
- DynamicPDF Merger for .NET Professional Edition
- DynamicPDF Merger for .NET Enterprise Edition
- DynamicPDF ReportWriter for .NET Professional Edition
- DynamicPDF ReportWriter for .NET Enterprise Edition
- DynamicPDF Core Suite for .NET Professional Edition
- DynamicPDF Core Suite for .NET Enterprise Edition
Remarks
See the Colors topic for more on gradient patterns.
Constructors
Gradient(Single, Single, Single, Single, CmykColor, CmykColor)
Initializes a new instance of the Gradient class.
public Gradient(float x1, float y1, float x2, float y2, CmykColor color1, CmykColor color2)
Public Sub New (x1 As Single, y1 As Single, x2 As Single, y2 As Single, color1 As CmykColor, color2 As CmykColor)
Parameters
- x1: Single
X coordinate of the first color.
- y1: Single
Y coordinate of the first color.
- x2: Single
X coordinate of the second color.
- y2: Single
Y coordinate of the second color.
- color1: CmykColor
First CMYK color.
- color2: CmykColor
Second CMYK color.
Gradient(Single, Single, Single, Single, Grayscale, Grayscale)
Initializes a new instance of the Gradient class.
public Gradient(float x1, float y1, float x2, float y2, Grayscale color1, Grayscale color2)
Public Sub New (x1 As Single, y1 As Single, x2 As Single, y2 As Single, color1 As Grayscale, color2 As Grayscale)
Parameters
- x1: Single
X coordinate of the first color.
- y1: Single
Y coordinate of the first color.
- x2: Single
X coordinate of the second color.
- y2: Single
Y coordinate of the second color.
- color1: Grayscale
First Grayscale color.
- color2: Grayscale
Second Grayscale color.
Gradient(Single, Single, Single, Single, RgbColor, RgbColor)
Initializes a new instance of the Gradient class.
public Gradient(float x1, float y1, float x2, float y2, RgbColor color1, RgbColor color2)
Public Sub New (x1 As Single, y1 As Single, x2 As Single, y2 As Single, color1 As RgbColor, color2 As RgbColor)
Parameters
- x1: Single
X coordinate of the first color.
- y1: Single
Y coordinate of the first color.
- x2: Single
X coordinate of the second color.
- y2: Single
Y coordinate of the second color.
- color1: RgbColor
First RGB color.
- color2: RgbColor
Second RGB color.
Properties
Color1
Gets the first color.
public DeviceColor Color1 { get; }
Public Property Color1 As DeviceColor
Property Value
Color2
Gets the second color.
public DeviceColor Color2 { get; }
Public Property Color2 As DeviceColor
Property Value
ColorSpace
Gets the color space for the color.
public ColorSpace ColorSpace { get; }
Public Property ColorSpace As ColorSpace
Property Value
X1
Gets or sets the X coordinate of the first color.
public float X1 { get; set; }
Public Property X1 As Single
Property Value
X2
Gets or sets the X coordinate of the second color.
public float X2 { get; set; }
Public Property X2 As Single
Property Value
Y1
Gets or sets the Y coordinate of the first color.
public float Y1 { get; set; }
Public Property Y1 As Single
Property Value
Y2
Gets or sets the Y coordinate of the second color.
public float Y2 { get; set; }
Public Property Y2 As Single
Property Value
Methods
DrawFill(OperatorWriter)
Draws the color data to the given OperatorWriter object. (Inherited from Color)
public void DrawFill(OperatorWriter writer)
Sub DrawFill(writer As OperatorWriter)
Parameters
- writer: OperatorWriter
OperatorWriter object to receive the color data.
DrawFill(PageWriter)
Draws the color data to the given PageWriter object.
public void DrawFill(PageWriter writer)
Sub DrawFill(writer As PageWriter)
Parameters
- writer: PageWriter
PageWriter object to receive the color data.
DrawStroke(OperatorWriter)
Draws the color data to the given OperatorWriter object. (Inherited from Color)
public void DrawStroke(OperatorWriter writer)
Sub DrawStroke(writer As OperatorWriter)
Parameters
- writer: OperatorWriter
OperatorWriter object to receive the color data.
DrawStroke(PageWriter)
Draws the color data to the given PageWriter object.
public void DrawStroke(PageWriter writer)
Sub DrawStroke(writer As PageWriter)
Parameters
- writer: PageWriter
PageWriter object to receive the color data.
Equals(Object)
Tests equality of colors.
public bool Equals(Object obj)
Function Equals(obj As Object) As Boolean
Parameters
- obj: Object
Object to compare to the current Color .
Returns
true if the two colors are equal
GetHashCode()
Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
public int GetHashCode()
Function GetHashCode() As Integer
Returns
A hash code for the current Color object.
GetResource(PageWriter)
Gets the resource for the gradient.
public Resource GetResource(PageWriter writer)
Function GetResource(writer As PageWriter) As Resource
Parameters
- writer: PageWriter
PageWriter object to receive the gradient color data.
Returns
The Resource used for the gradient.
GetType()
Gets the Type of the current instance. (Inherited from Object)
public Type GetType()
Function GetType() As Type
Returns
The Type instance that represents the exact runtime type of the current instance.
ToString()
Returns a String that represents the current Object . (Inherited from Object)
public string ToString()
Function ToString() As String
Returns
A String that represents the current Object .