public abstract class AbstractPdfShading extends PdfObjectWrapper<PdfDictionary>
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractPdfShading(PdfDictionary pdfObject)
Creates the
AbstractPdfShading object from the existing PdfDictionary. |
protected |
AbstractPdfShading(PdfDictionary pdfObject,
int type,
PdfColorSpace colorSpace)
Creates the
AbstractPdfShading object from the existing PdfDictionary,
using provided type and colorspace. |
| 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 AbstractPdfShading |
makeShading(PdfDictionary shadingDictionary)
Creates the
AbstractPdfShading object from the existing PdfDictionary with corresponding type. |
void |
setFunction(IPdfFunction function)
Sets the function that represents color transitions
across the shading geometry as one object.
|
void |
setFunction(IPdfFunction[] 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, unsetForbidReleaseprotected AbstractPdfShading(PdfDictionary pdfObject)
AbstractPdfShading object from the existing PdfDictionary.pdfObject - PdfDictionary from which the AbstractPdfShading object will be createdprotected AbstractPdfShading(PdfDictionary pdfObject, int type, PdfColorSpace colorSpace)
AbstractPdfShading object from the existing PdfDictionary,
using provided type and colorspace.pdfObject - PdfDictionary from which the AbstractPdfShading object will be createdtype - type with which this AbstractPdfShading object will be createdcolorSpace - PdfColorSpace with which this AbstractPdfShading object will be createdpublic static AbstractPdfShading makeShading(PdfDictionary shadingDictionary)
AbstractPdfShading object from the existing PdfDictionary with corresponding type.shadingDictionary - PdfDictionary from which the AbstractPdfShading object will be createdAbstractPdfShading objectpublic int getShadingType()
PdfName.ShadingTypepublic PdfObject getColorSpace()
PdfObject Color spacepublic PdfObject getFunction()
PdfObject Functionpublic final void setFunction(IPdfFunction function)
function - The IPdfFunction to setpublic final void setFunction(IPdfFunction[] functions)
functions - The array of IPdfFunction to be setpublic final 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()
isWrappedObjectMustBeIndirect in class PdfObjectWrapper<PdfDictionary>Copyright © 1998–2024 Apryse Group NV. All rights reserved.