Class PdfShading.Radial
- Namespace
- iText.Kernel.Pdf.Colorspace
- Assembly
- itext.kernel.dll
The class that extends PdfShading class and is in charge of Shading Dictionary with radial type, that define a colour blend that varies between two circles.
public class PdfShading.Radial : PdfShading
- Inheritance
-
PdfShading.Radial
- Inherited Members
Remarks
The class that extends PdfShading class and is in charge of Shading Dictionary with radial type, that define a colour blend that varies between two circles. This type of shading shall not be used with an Indexed colour space
Constructors
Radial(PdfColorSpace, float, float, float, float[], float, float, float, float[])
Creates the new instance of the class.
public Radial(PdfColorSpace cs, float x0, float y0, float r0, float[] color0, float x1, float y1, float r1, float[] color1)
Parameters
cs
PdfColorSpacethe PdfColorSpace object in which colour values shall be expressed. The Indexed color space isn't excepted.
x0
floatthe X coordinate of starting circle's centre, expressed in in the shading’s target coordinate space.
y0
floatthe Y coordinate of starting circle's centre, expressed in in the shading’s target coordinate space.
r0
floatthe radius of starting circle's centre, should be greater or equal to 0. If 0 then starting circle is treated as point. If both radii are 0, nothing shall be painted.
color0
float[]the
float[]
that represents the color in the start circle.x1
floatthe X coordinate of ending circle's centre, expressed in in the shading’s target coordinate space.
y1
floatthe Y coordinate of ending circle's centre, expressed in in the shading’s target coordinate space.
r1
floatthe radius of ending circle's centre, should be greater or equal to 0. If 0 then ending circle is treated as point. If both radii are 0, nothing shall be painted.
color1
float[]the
float[]
that represents the color in the end circle.
Radial(PdfColorSpace, float, float, float, float[], float, float, float, float[], bool[])
Creates the new instance of the class.
public Radial(PdfColorSpace cs, float x0, float y0, float r0, float[] color0, float x1, float y1, float r1, float[] color1, bool[] extend)
Parameters
cs
PdfColorSpacethe PdfColorSpace object in which colour values shall be expressed. The Indexed color space isn't excepted.
x0
floatthe X coordinate of starting circle's centre, expressed in in the shading’s target coordinate space.
y0
floatthe Y coordinate of starting circle's centre, expressed in in the shading’s target coordinate space.
r0
floatthe radius of starting circle's centre, should be greater or equal to 0. If 0 then starting circle is treated as point. If both radii are 0, nothing shall be painted.
color0
float[]the
float[]
that represents the color in the start circle.x1
floatthe X coordinate of ending circle's centre, expressed in in the shading’s target coordinate space.
y1
floatthe Y coordinate of ending circle's centre, expressed in in the shading’s target coordinate space.
r1
floatthe radius of ending circle's centre, should be greater or equal to 0. If 0 then ending circle is treated as point. If both radii are 0, nothing shall be painted.
color1
float[]the
float[]
that represents the color in the end circle.extend
bool[]the array of two
boolean
that specified whether to extend the shading beyond the starting and ending points of the axis, respectively.
Radial(PdfColorSpace, PdfArray, IPdfFunction)
Creates the new instance of the class.
public Radial(PdfColorSpace cs, PdfArray coords, IPdfFunction function)
Parameters
cs
PdfColorSpacethe PdfColorSpace object in which colour values shall be expressed. The Indexed color space isn't excepted.
coords
PdfArraythe PdfArray of of six numbers [x0 y0 r0 x1 y1 r1], specifying the centres and radii of the starting and ending circles, expressed in the shading’s target coordinate space. The radii r0 and r1 shall both be greater than or equal to 0. If one radius is 0, the corresponding circle shall be treated as a point; if both are 0, nothing shall be painted.
function
IPdfFunctionthe IPdfFunction object, that is used to calculate color transitions.
Radial(PdfDictionary)
Creates the new instance of the class from the existing PdfDictionary.
protected Radial(PdfDictionary pdfDictionary)
Parameters
pdfDictionary
PdfDictionaryfrom which this PdfShading.Radial will be created
Methods
GetCoords()
Gets the coords PdfArray object - an array of six numbers [x0 y0 r0 x1 y1 r1], specifying the centres and radii of the starting and ending circles, expressed in the shading’s target coordinate space.
public virtual PdfArray GetCoords()
Returns
Remarks
Gets the coords PdfArray object - an array of six numbers [x0 y0 r0 x1 y1 r1], specifying the centres and radii of the starting and ending circles, expressed in the shading’s target coordinate space. The radii r0 and r1 shall both be greater than or equal to 0. If one radius is 0, the corresponding circle shall be treated as a point; if both are 0, nothing shall be painted.
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 circles of the axis, respectively.
public virtual PdfArray GetExtend()
Returns
SetCoords(float, float, float, float, float, float)
Sets the coords object.
public virtual void SetCoords(float x0, float y0, float r0, float x1, float y1, float r1)
Parameters
x0
floatthe X coordinate of starting circle's centre, expressed in in the shading’s target coordinate space.
y0
floatthe Y coordinate of starting circle's centre, expressed in in the shading’s target coordinate space.
r0
floatthe radius of starting circle's centre, should be greater or equal to 0. If 0 then starting circle is treated as point. If both radii are 0, nothing shall be painted.
x1
floatthe X coordinate of ending circle's centre, expressed in in the shading’s target coordinate space.
y1
floatthe Y coordinate of ending circle's centre, expressed in in the shading’s target coordinate space.
r1
floatthe radius of ending circle's centre, should be greater or equal to 0. If 0 then ending circle is treated as point. If both radii are 0, nothing shall be painted.
SetCoords(PdfArray)
Sets the coords PdfArray object - an array of six numbers [x0 y0 r0 x1 y1 r1], specifying the centres and radii of the starting and ending circles, expressed in the shading’s target coordinate space.
public virtual void SetCoords(PdfArray coords)
Parameters
Remarks
Sets the coords PdfArray object - an array of six numbers [x0 y0 r0 x1 y1 r1], specifying the centres and radii of the starting and ending circles, expressed in the shading’s target coordinate space. The radii r0 and r1 shall both be greater than or equal to 0. If one radius is 0, the corresponding circle shall be treated as a point; if both are 0, nothing shall be painted.
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 circle of Coords.
extendEnd
boolif true will extend shading beyond the ending circle 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 circle of Coords.
If second is true shading will extend beyond the ending circle of Coords.