public abstract class PdfPattern extends PdfObjectWrapper<PdfDictionary>
| Modifier and Type | Class and Description |
|---|---|
static class |
PdfPattern.Shading
Shading pattern provides a smooth transition between colors across an area to be painted,
independent of the resolution of any particular output device and without specifying
the number of steps in the color transition.
|
static class |
PdfPattern.Tiling
Wrapper that represents tiling pattern of color space.
|
| Modifier | Constructor and Description |
|---|---|
protected |
PdfPattern(PdfDictionary pdfObject)
Wraps the passed
PdfDictionary. |
| 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. |
PdfArray |
getMatrix()
Gets a transformation matrix that maps the pattern’s internal coordinate system
to the default coordinate system of the pattern’s parent content stream.
|
static PdfPattern |
getPatternInstance(PdfDictionary pdfObject)
Creates the instance wrapper of correct type from the
PdfDictionary |
protected boolean |
isWrappedObjectMustBeIndirect()
Defines if the object behind this wrapper must be an indirect object in the
resultant document.
|
void |
setMatrix(PdfArray matrix)
Sets a transformation matrix that maps the pattern’s internal coordinate system
to the default coordinate system of the pattern’s parent content stream.
|
ensureObjectIsAddedToDocument, ensureUnderlyingObjectHasIndirectReference, getPdfObject, isFlushed, makeIndirect, makeIndirect, markObjectAsIndirect, setForbidRelease, setModified, setPdfObject, unsetForbidReleaseprotected PdfPattern(PdfDictionary pdfObject)
PdfDictionary.pdfObject - the PdfDictionary that represent Patternpublic static PdfPattern getPatternInstance(PdfDictionary pdfObject)
PdfDictionarypdfObject - the PdfDictionary that represent Patternpublic PdfArray getMatrix()
public void setMatrix(PdfArray matrix)
matrix - pattern matrix to setpublic 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()
PdfObjectWrapperisWrappedObjectMustBeIndirect in class PdfObjectWrapper<PdfDictionary>Copyright © 1998–2023 iText Group NV. All rights reserved.