public abstract class PdfShading extends PdfObjectWrapper<PdfDictionary>
Modifier and Type | Class and Description |
---|---|
static class |
PdfShading.Axial
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.
|
static class |
PdfShading.CoonsPatchMesh
The class that extends PdfShading class and is in charge of Shading Dictionary with Coons Patch mesh type.
|
static class |
PdfShading.FreeFormGouraudShadedTriangleMesh
The class that extends PdfShading class and is in charge of Shading Dictionary with free-form Gouraud-shaded triangle mesh type.
|
static class |
PdfShading.FunctionBased
The class that extends PdfShading 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.
|
static class |
PdfShading.LatticeFormGouraudShadedTriangleMesh
The class that extends PdfShading class and is in charge of Shading Dictionary with lattice-form Gouraud-shaded triangle mesh type.
|
static class |
PdfShading.Radial
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.
|
static class |
PdfShading.TensorProductPatchMesh
The class that extends PdfShading class and is in charge of Shading Dictionary with Tensor-Product Patch mesh type.
|
Modifier | Constructor and Description |
---|---|
protected |
PdfShading(PdfDictionary pdfObject) |
protected |
PdfShading(PdfDictionary pdfObject, int type, PdfColorSpace colorSpace) |
protected |
PdfShading(PdfDictionary pdfObject, int type, PdfObject colorSpace)
Deprecated.
Use
PdfShading(PdfDictionary, int, PdfColorSpace) instead.
|
Modifier and Type | Method and Description |
---|---|
void |
flush()
To manually flush a PdfObject behind this wrapper, you have to ensure that this object is added to the document, i.e.
|
PdfObject |
getColorSpace()
Gets the color space in which colour values shall be expressed.
|
PdfObject |
getFunction()
Gets the function PdfObject that represents color transitions across the shading geometry.
|
int |
getShadingType()
Gets the shading type.
|
protected boolean |
isWrappedObjectMustBeIndirect()
Defines if the object behind this wrapper must be an indirect object in the resultant document.
|
static PdfShading |
makeShading(PdfDictionary shadingDictionary)
Creates the PdfShading object from the existing PdfDictionary with corresponding type.
|
void |
setFunction(PdfFunction function)
Sets the function that represents color transitions across the shading geometry as one object.
|
void |
setFunction(PdfFunction[] functions)
Sets the function object that represents color transitions across the shading geometry as an array of functions.
|
ensureObjectIsAddedToDocument, ensureUnderlyingObjectHasIndirectReference, getPdfObject, isFlushed, makeIndirect, makeIndirect, markObjectAsIndirect, setForbidRelease, setModified, setPdfObject, unsetForbidRelease
protected PdfShading(PdfDictionary pdfObject)
@Deprecated protected PdfShading(PdfDictionary pdfObject, int type, PdfObject colorSpace)
PdfShading(PdfDictionary, int, PdfColorSpace)
instead.
protected PdfShading(PdfDictionary pdfObject, int type, PdfColorSpace colorSpace)
public static PdfShading makeShading(PdfDictionary shadingDictionary)
PdfShading
object from the existing PdfDictionary
with corresponding type.
shadingDictionary
- PdfDictionary
from which the PdfShading
object will be created.
PdfShading
object.
public int getShadingType()
PdfName.ShadingType
.
public PdfObject getColorSpace()
PdfObject
Color space
public PdfObject getFunction()
PdfObject
Function
public void setFunction(PdfFunction function)
function
- The PdfFunction
to set.
public void setFunction(PdfFunction[] functions)
functions
- The array of PdfFunction
to be set.
public void flush()
PdfObject
behind this wrapper, you have to ensure that this object is added to the document, i.e. it has an indirect reference. Basically this means that before flushing you need to explicitly call PdfObjectWrapper.makeIndirect(PdfDocument)
. For example: wrapperInstance.makeIndirect(document).flush(); Note that not every wrapper require this, only those that have such warning in documentation.
flush
in class PdfObjectWrapper<PdfDictionary>
protected boolean isWrappedObjectMustBeIndirect()
PdfObjectWrapper
isWrappedObjectMustBeIndirect
in class PdfObjectWrapper<PdfDictionary>
Copyright © 1998–2018 iText Group NV. All rights reserved.