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)
Creates a new Tiling Pattern instance.
|
Tiling(float width, float height, boolean colored)
Creates a new Tiling Pattern instance.
|
Tiling(float width, float height, float xStep, float yStep)
Creates a new Tiling Pattern instance.
|
Tiling(float width, float height, float xStep, float yStep, boolean colored)
Creates a new Tiling Pattern instance.
|
Tiling(PdfStream pdfObject)
Creates new instance from the PdfStream object.
|
Tiling(Rectangle bbox)
Creates a new Tiling instance.
|
Tiling(Rectangle bbox, boolean colored)
Creates a new Tiling instance.
|
Tiling(Rectangle bbox, float xStep, float yStep)
Creates a new Tiling instance.
|
Tiling(Rectangle bbox, float xStep, float yStep, boolean colored)
Creates a new Tiling instance.
|
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()
Gets the Tiling Pattern's resources.
|
int |
getTilingType()
Gets the tiling type.
|
float |
getXStep()
Gets the desired horizontal space between pattern cells.
|
float |
getYStep()
Gets the desired vertical space between pattern cells.
|
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)
Sets the desired horizontal space between pattern cells.
|
void |
setYStep(float yStep)
Sets the desired vertical space between pattern cells.
|
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)
By default the pattern will be colored.
width
- the width of the pattern cell's bounding box
height
- the height of the pattern cell's bounding box
public Tiling(float width, float height, boolean colored)
width
- the width of the pattern cell's bounding box
height
- the height of the pattern cell's bounding box
colored
- defines whether the Tiling Pattern will be colored or not
public Tiling(Rectangle bbox)
By default the pattern will be colored.
bbox
- the pattern cell's bounding box
public Tiling(Rectangle bbox, boolean colored)
bbox
- the pattern cell's bounding box
colored
- defines whether the Tiling Pattern will be colored or not
public Tiling(float width, float height, float xStep, float yStep)
By default the pattern will be colored.
width
- the width of the pattern cell's bounding box
height
- the height of the pattern cell's bounding box
xStep
- the desired horizontal space between pattern cells
yStep
- the desired vertical space between pattern cells
public Tiling(float width, float height, float xStep, float yStep, boolean colored)
width
- the width of the pattern cell's bounding box
height
- the height of the pattern cell's bounding box
xStep
- the desired horizontal space between pattern cells
yStep
- the desired vertical space between pattern cells
colored
- defines whether the Tiling Pattern will be colored or not
public Tiling(Rectangle bbox, float xStep, float yStep)
By default the pattern will be colored.
bbox
- the pattern cell's bounding box
xStep
- the desired horizontal space between pattern cells
yStep
- the desired vertical space between pattern cells
public Tiling(Rectangle bbox, float xStep, float yStep, boolean colored)
bbox
- the pattern cell's bounding box
xStep
- the desired horizontal space between pattern cells
yStep
- the desired vertical space between pattern cells
colored
- defines whether the Tiling Pattern will be colored or not
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)
xStep
- the desired horizontal space between pattern cells
public float getYStep()
public void setYStep(float yStep)
yStep
- the desired vertical space between pattern cells
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–2021 iText Group NV. All rights reserved.