Class PdfShading.Axial
- Namespace
- iText.Kernel.Pdf.Colorspace
- Assembly
- itext.kernel.dll
The class that extends PdfShading class and is in charge of Shading Dictionary with axial type, that define a colour blend that varies along a linear axis between two endpoints and extends indefinitely perpendicular to that axis.
public class PdfShading.Axial : PdfShading
- Inheritance
-
PdfShading.Axial
- Inherited Members
Constructors
Axial(PdfColorSpace, float, float, float[], float, float, float[])
Creates the new instance of the class.
public Axial(PdfColorSpace cs, float x0, float y0, float[] color0, float x1, float y1, float[] color1)
Parameters
cs
PdfColorSpacethe PdfColorSpace object in which colour values shall be expressed. The special Pattern space isn't excepted.
x0
floatthe start coordinate of X axis expressed in the shading's target coordinate space.
y0
floatthe start coordinate of Y axis expressed in the shading's target coordinate space.
color0
float[]the
float[]
that represents the color in the start point.x1
floatthe end coordinate of X axis expressed in the shading's target coordinate space.
y1
floatthe end coordinate of Y axis expressed in the shading's target coordinate space.
color1
float[]the
float[]
that represents the color in the end point.
Axial(PdfColorSpace, float, float, float[], float, float, float[], bool[])
Creates the new instance of the class.
public Axial(PdfColorSpace cs, float x0, float y0, float[] color0, float x1, float y1, float[] color1, bool[] extend)
Parameters
cs
PdfColorSpacethe PdfColorSpace object in which colour values shall be expressed. The special Pattern space isn't excepted.
x0
floatthe start coordinate of X axis expressed in the shading's target coordinate space.
y0
floatthe start coordinate of Y axis expressed in the shading's target coordinate space.
color0
float[]the
float[]
that represents the color in the start point.x1
floatthe end coordinate of X axis expressed in the shading's target coordinate space.
y1
floatthe end coordinate of Y axis expressed in the shading's target coordinate space.
color1
float[]the
float[]
that represents the color in the end point.extend
bool[]the array of two booleans that specified whether to extend the shading beyond the starting and ending points of the axis, respectively.
Axial(PdfColorSpace, PdfArray, IPdfFunction)
Creates the new instance of the class.
public Axial(PdfColorSpace cs, PdfArray coords, IPdfFunction function)
Parameters
cs
PdfColorSpacethe PdfColorSpace object in which colour values shall be expressed. The special Pattern space isn't excepted.
coords
PdfArraythe PdfArray of four numbers [x0 y0 x1 y1] that specified the starting and the endings coordinates of thew axis, expressed in the shading's target coordinate space.
function
IPdfFunctionthe IPdfFunction object, that is used to calculate color transitions.
Axial(PdfColorSpace, PdfArray, PdfArray, IPdfFunction)
Creates the new instance of the class.
public Axial(PdfColorSpace cs, PdfArray coords, PdfArray domain, IPdfFunction function)
Parameters
cs
PdfColorSpacethe PdfColorSpace object in which colour values shall be expressed. The special Pattern space isn't excepted.
coords
PdfArraythe PdfArray of four numbers [x0 y0 x1 y1] that specified the starting and the endings coordinates of thew axis, expressed in the shading's target coordinate space.
domain
PdfArraythe PdfArray of two numbers [t0 t1] specifying the limiting values of a parametric variable t which is considered to vary linearly between these two values and becomes the input argument to the colour function.
function
IPdfFunctionthe IPdfFunction object, that is used to calculate color transitions.
Axial(PdfDictionary)
Creates the new instance of the class from the existing PdfDictionary.
protected Axial(PdfDictionary pdfDictionary)
Parameters
pdfDictionary
PdfDictionaryfrom which this PdfShading.Axial will be created
Methods
GetCoords()
Gets the Coords object - a PdfArray of four numbers [x0 y0 x1 y1] that specified the starting and the endings coordinates of thew axis, expressed in the shading's target coordinate space.
public virtual PdfArray GetCoords()
Returns
GetDomain()
Gets the
PdfArray
of two
float
[t0, t1] that represent the limiting values of a parametric
variable t, that becomes an input of color function(s).
public virtual PdfArray GetDomain()
Returns
GetExtend()
Gets the
PdfArray
of two
boolean
that specified whether to extend the shading
beyond the starting and ending points of the axis, respectively.
public virtual PdfArray GetExtend()
Returns
SetCoords(float, float, float, float)
Sets the Choords object with the four params expressed in the shading's target coordinate space.
public virtual void SetCoords(float x0, float y0, float x1, float y1)
Parameters
x0
floatthe start coordinate of X axis to be set.
y0
floatthe start coordinate of Y axis to be set.
x1
floatthe end coordinate of X axis to be set.
y1
floatthe end coordinate of Y axis to be set.
SetCoords(PdfArray)
Sets the Choords object with the PdfArray of four numbers [x0 y0 x1 y1], that specified the starting and the endings coordinates of thew axis, expressed in the shading's target coordinate space.
public virtual void SetCoords(PdfArray coords)
Parameters
SetDomain(float, float)
Sets the Domain with the array of two
float
[t0, t1] that represent the limiting values
of a parametric variable t, that becomes an input of color function(s).
public virtual void SetDomain(float t0, float t1)
Parameters
SetDomain(PdfArray)
Sets the Domain with the
PdfArray
of two
float
[t0, t1] that represent the limiting values
of a parametric variable t, that becomes an input of color function(s).
public virtual void SetDomain(PdfArray domain)
Parameters
SetExtend(bool, bool)
Sets the Extend object with the two
boolean
value.
public virtual void SetExtend(bool extendStart, bool extendEnd)
Parameters
extendStart
boolif true will extend shading beyond the starting point of Coords
extendEnd
boolif true will extend shading beyond the ending point of Coords
SetExtend(PdfArray)
Sets the Extend object with the
PdfArray
of two
boolean
.
public virtual void SetExtend(PdfArray extend)
Parameters
Remarks
Sets the Extend object with the
PdfArray
of two
boolean
.
If first is true shading will extend beyond the starting point of Coords.
If second is true shading will extend beyond the ending point of Coords.