public static class PdfPattern.Tiling extends PdfPattern
Modifier and Type | Class and Description |
---|---|
static class |
PdfPattern.Tiling.PaintType
A code that determines how the colour of the pattern cell shall be specified
|
static class |
PdfPattern.Tiling.TilingType
A code that controls adjustments to the spacing of tiles relative to the device pixel grid
|
PdfPattern.Shading, PdfPattern.Tiling
Constructor and Description |
---|
Tiling(float width, float height) |
Tiling(float width, float height, boolean colored) |
Tiling(float width, float height, float xStep, float yStep) |
Tiling(float width, float height, float xStep, float yStep, boolean colored) |
Tiling(PdfStream pdfObject)
Creates new instance from the PdfStream object.
|
Tiling(Rectangle bbox) |
Tiling(Rectangle bbox, boolean colored) |
Tiling(Rectangle bbox, float xStep, float yStep) |
Tiling(Rectangle bbox, float xStep, float yStep, boolean colored) |
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.
|
Rectangle |
getBBox()
Gets the pattern cell's bounding box.
|
PdfResources |
getResources() |
int |
getTilingType()
Gets the tiling type.
|
float |
getXStep() |
float |
getYStep() |
boolean |
isColored()
Checks if this pattern have colored paint type.
|
void |
setBBox(Rectangle bbox)
Sets the pattern cell's bounding box.
|
void |
setColored(boolean colored)
Sets the paint type.
|
void |
setTilingType(int tilingType)
Sets the tiling type.
|
void |
setXStep(float xStep) |
void |
setYStep(float yStep) |
getMatrix, getPatternInstance, isWrappedObjectMustBeIndirect, setMatrix
ensureObjectIsAddedToDocument, ensureUnderlyingObjectHasIndirectReference, getPdfObject, isFlushed, makeIndirect, makeIndirect, markObjectAsIndirect, setForbidRelease, setModified, setPdfObject, unsetForbidRelease
public Tiling(PdfStream pdfObject)
PdfStream
object. This stream should have PatternType equals to 1.
pdfObject
- the PdfStream
that represents Tiling Pattern.
public Tiling(float width, float height)
public Tiling(float width, float height, boolean colored)
public Tiling(Rectangle bbox)
public Tiling(Rectangle bbox, boolean colored)
public Tiling(float width, float height, float xStep, float yStep)
public Tiling(float width, float height, float xStep, float yStep, boolean colored)
public Tiling(Rectangle bbox, float xStep, float yStep)
public Tiling(Rectangle bbox, float xStep, float yStep, boolean colored)
public boolean isColored()
true
if this pattern's paint type is PdfPattern.Tiling.PaintType.COLORED
and false
otherwise.
public void setColored(boolean colored)
colored
- if true
then the paint type will be set as PdfPattern.Tiling.PaintType.COLORED
, and PdfPattern.Tiling.PaintType.UNCOLORED
otherwise.
public int getTilingType()
PdfPattern.Tiling.TilingType
public void setTilingType(int tilingType)
tilingType
- int value of PdfPattern.Tiling.TilingType
to set.
IllegalArgumentException
- in case of wrong value.
public Rectangle getBBox()
public void setBBox(Rectangle bbox)
bbox
- pattern cell's bounding box to set.
public float getXStep()
public void setXStep(float xStep)
public float getYStep()
public void setYStep(float yStep)
public PdfResources getResources()
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 PdfPattern
Copyright © 1998–2017 iText Group NV. All rights reserved.