Class PdfShading.FunctionBased
- java.lang.Object
-
- com.itextpdf.kernel.pdf.PdfObjectWrapper<PdfDictionary>
-
- com.itextpdf.kernel.pdf.colorspace.PdfShading
-
- com.itextpdf.kernel.pdf.colorspace.PdfShading.FunctionBased
-
- Enclosing class:
- PdfShading
public static class PdfShading.FunctionBased extends PdfShading
The class that extendsPdfShading
class and is in charge of Shading Dictionary with function-based type, that defines color at every point in the domain by a specified mathematical function.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.itextpdf.kernel.pdf.colorspace.PdfShading
PdfShading.Axial, PdfShading.CoonsPatchMesh, PdfShading.FreeFormGouraudShadedTriangleMesh, PdfShading.FunctionBased, PdfShading.LatticeFormGouraudShadedTriangleMesh, PdfShading.Radial, PdfShading.ShadingType, PdfShading.TensorProductPatchMesh
-
-
Constructor Summary
Constructors Modifier Constructor Description FunctionBased(PdfColorSpace colorSpace, IPdfFunction function)
Creates the new instance of the class.protected
FunctionBased(PdfDictionary pdfDictionary)
Creates the new instance of the class from the existingPdfDictionary
.FunctionBased(PdfObject colorSpace, IPdfFunction function)
Creates the new instance of the class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PdfArray
getDomain()
Gets thePdfArray
domain rectangle object that establishes an internal coordinate space for the shading that is independent of the target coordinate space in which it shall be painted.PdfArray
getMatrix()
Gets thePdfArray
of floats that represents the transformation matrix that maps the domain rectangle into a corresponding figure in the target coordinate space.void
setDomain(float xmin, float xmax, float ymin, float ymax)
Sets thePdfArray
domain rectangle object that establishes an internal coordinate space for the shading that is independent of the target coordinate space in which it shall be painted.void
setDomain(PdfArray domain)
Sets thePdfArray
domain rectangle object that establishes an internal coordinate space for the shading that is independent of the target coordinate space in which it shall be painted.void
setMatrix(float[] matrix)
Sets the array of floats that represents the transformation matrix that maps the domain rectangle into a corresponding figure in the target coordinate space.void
setMatrix(PdfArray matrix)
Sets the array of floats that represents the transformation matrix that maps the domain rectangle into a corresponding figure in the target coordinate space.-
Methods inherited from class com.itextpdf.kernel.pdf.colorspace.PdfShading
flush, getColorSpace, getFunction, getShadingType, isWrappedObjectMustBeIndirect, makeShading, setFunction, setFunction
-
Methods inherited from class com.itextpdf.kernel.pdf.PdfObjectWrapper
ensureObjectIsAddedToDocument, ensureUnderlyingObjectHasIndirectReference, getPdfObject, isFlushed, makeIndirect, makeIndirect, markObjectAsIndirect, setForbidRelease, setModified, setPdfObject, unsetForbidRelease
-
-
-
-
Constructor Detail
-
FunctionBased
protected FunctionBased(PdfDictionary pdfDictionary)
Creates the new instance of the class from the existingPdfDictionary
.- Parameters:
pdfDictionary
- from which thisPdfShading.FunctionBased
will be created
-
FunctionBased
public FunctionBased(PdfColorSpace colorSpace, IPdfFunction function)
Creates the new instance of the class.- Parameters:
colorSpace
- thePdfColorSpace
object in which colour values shall be expressed.function
- theIPdfFunction
, that is used to calculate color transitions.
-
FunctionBased
public FunctionBased(PdfObject colorSpace, IPdfFunction function)
Creates the new instance of the class.- Parameters:
colorSpace
- thePdfObject
, that represents color space in which colour values shall be expressed.function
- theIPdfFunction
, that is used to calculate color transitions.
-
-
Method Detail
-
getDomain
public PdfArray getDomain()
Gets thePdfArray
domain rectangle object that establishes an internal coordinate space for the shading that is independent of the target coordinate space in which it shall be painted.- Returns:
PdfArray
domain rectangle.
-
setDomain
public void setDomain(float xmin, float xmax, float ymin, float ymax)
Sets thePdfArray
domain rectangle object that establishes an internal coordinate space for the shading that is independent of the target coordinate space in which it shall be painted.- Parameters:
xmin
- the Xmin coordinate of rectangle.xmax
- the Xmax coordinate of rectangle.ymin
- the Ymin coordinate of rectangle.ymax
- the Ymax coordinate of rectangle.
-
setDomain
public void setDomain(PdfArray domain)
Sets thePdfArray
domain rectangle object that establishes an internal coordinate space for the shading that is independent of the target coordinate space in which it shall be painted.- Parameters:
domain
- thePdfArray
domain rectangle object to be set.
-
getMatrix
public PdfArray getMatrix()
Gets thePdfArray
of floats that represents the transformation matrix that maps the domain rectangle into a corresponding figure in the target coordinate space.- Returns:
- the
PdfArray
of transformation matrix (identical matrix by default).
-
setMatrix
public void setMatrix(float[] matrix)
Sets the array of floats that represents the transformation matrix that maps the domain rectangle into a corresponding figure in the target coordinate space.- Parameters:
matrix
- thefloat[]
of transformation matrix to be set.
-
-