Top Description Fields Constructors Methods
org.apache.pdfbox.pdmodel.graphics.pattern

public Class PDTilingPattern

extends PDAbstractPattern
implements PDContentStream
Class Inheritance
All Implemented Interfaces
org.apache.pdfbox.contentstream.PDContentStream
Imports
java.io.IOException, .InputStream, org.apache.pdfbox.contentstream.PDContentStream, org.apache.pdfbox.cos.COSArray, .COSDictionary, .COSName, .COSStream, org.apache.pdfbox.io.RandomAccessInputStream, .RandomAccessRead, org.apache.pdfbox.pdmodel.PDResources, .ResourceCache, org.apache.pdfbox.pdmodel.common.PDRectangle, .PDStream

A tiling pattern dictionary.

Field Summary

Modifier and TypeField and Description
public static final int
PAINT_COLORED

paint type 1 = colored tiling pattern.

public static final int
PAINT_UNCOLORED

paint type 2 = uncolored tiling pattern.

private final ResourceCache
public static final int
TILING_CONSTANT_SPACING

tiling type 1 = constant spacing.

public static final int
TILING_CONSTANT_SPACING_FASTER_TILING

tiling type 3 = constant spacing and faster tiling.

public static final int
TILING_NO_DISTORTION

tiling type 2 = no distortion.

Inherited from org.apache.pdfbox.pdmodel.graphics.pattern.PDAbstractPattern:
TYPE_SHADING_PATTERNTYPE_TILING_PATTERN

Constructor Summary

AccessConstructor and Description
public
PDTilingPattern()

Creates a new tiling pattern.

public
PDTilingPattern(COSDictionary
The COSDictionary for this pattern.
dictionary
)

Creates a new tiling pattern from the given COS dictionary.

public
PDTilingPattern(COSDictionary
The COSDictionary for this pattern.
dictionary
,
ResourceCache
The resource cache, may be null
resourceCache
)

Creates a new tiling pattern from the given COS dictionary.

Method Summary

Modifier and TypeMethod and Description
public PDRectangle

Returns:

The BBox of the pattern.
getBBox
()

Implements org.apache.pdfbox.contentstream.PDContentStream.getBBox.

An array of four numbers in the form coordinate system (see below), giving the coordinates of the left, bottom, right, and top edges, respectively, of the pattern's bounding box.

public InputStream
getContents()

Implements org.apache.pdfbox.contentstream.PDContentStream.getContents.

Returns this stream's content, if any.

public RandomAccessRead
public PDStream
public int

Returns:

The paint type
getPaintType
()

This will return the paint type.

public int
public PDResources

Returns:

The resources for this pattern.
getResources
()

Implements org.apache.pdfbox.contentstream.PDContentStream.getResources.

This will get the resources for this pattern.

public int

Returns:

The tiling type
getTilingType
()

This will return the tiling type.

public float

Returns:

The XStep value
getXStep
()

This will return the XStep value.

public float

Returns:

The YStep value
getYStep
()

This will return the YStep value.

public void
setBBox(PDRectangle
The new BBox for this Pattern.
bbox
)

This will set the BBox (bounding box) for this Pattern.

public void
setPaintType(int
The new paint type.
paintType
)

Overrides org.apache.pdfbox.pdmodel.graphics.pattern.PDAbstractPattern.setPaintType.

This will set the paint type.

public final void
setResources(PDResources
The new resources for this pattern.
resources
)

This will set the resources for this pattern.

public void
setTilingType(int
The new tiling type.
tilingType
)

This will set the tiling type.

public void
setXStep(float
The new XStep value.
xStep
)

This will set the XStep value.

public void
setYStep(float
The new YStep value.
yStep
)

This will set the YStep value.

Inherited from org.apache.pdfbox.pdmodel.graphics.pattern.PDAbstractPattern:
creategetCOSObjectgetMatrixgetTypesetMatrixsetPatternType

Field Detail

PAINT_COLOREDback to summary
public static final int PAINT_COLORED

paint type 1 = colored tiling pattern.

PAINT_UNCOLOREDback to summary
public static final int PAINT_UNCOLORED

paint type 2 = uncolored tiling pattern.

resourceCacheback to summary
private final ResourceCache resourceCache
TILING_CONSTANT_SPACINGback to summary
public static final int TILING_CONSTANT_SPACING

tiling type 1 = constant spacing.

TILING_CONSTANT_SPACING_FASTER_TILINGback to summary
public static final int TILING_CONSTANT_SPACING_FASTER_TILING

tiling type 3 = constant spacing and faster tiling.

TILING_NO_DISTORTIONback to summary
public static final int TILING_NO_DISTORTION

tiling type 2 = no distortion.

Constructor Detail

PDTilingPatternback to summary
public PDTilingPattern()

Creates a new tiling pattern.

PDTilingPatternback to summary
public PDTilingPattern(COSDictionary dictionary)

Creates a new tiling pattern from the given COS dictionary.

Parameters
dictionary:COSDictionary

The COSDictionary for this pattern.

PDTilingPatternback to summary
public PDTilingPattern(COSDictionary dictionary, ResourceCache resourceCache)

Creates a new tiling pattern from the given COS dictionary.

Parameters
dictionary:COSDictionary

The COSDictionary for this pattern.

resourceCache:ResourceCache

The resource cache, may be null

Method Detail

getBBoxback to summary
public PDRectangle getBBox()

Implements org.apache.pdfbox.contentstream.PDContentStream.getBBox.

An array of four numbers in the form coordinate system (see below), giving the coordinates of the left, bottom, right, and top edges, respectively, of the pattern's bounding box.

Returns:PDRectangle

The BBox of the pattern.

Annotations
@Override
getContentsback to summary
public InputStream getContents() throws IOException

Implements org.apache.pdfbox.contentstream.PDContentStream.getContents.

Doc from org.apache.pdfbox.contentstream.PDContentStream.getContents.

Returns this stream's content, if any.

Returns:InputStream

An InputStream or null.

Annotations
@Override
Exceptions
IOException:
If the stream could not be read
getContentsForRandomAccessback to summary
public RandomAccessRead getContentsForRandomAccess() throws IOException

Implements org.apache.pdfbox.contentstream.PDContentStream.getContentsForRandomAccess.

Doc from org.apache.pdfbox.contentstream.PDContentStream.getContentsForRandomAccess.

Returns this stream's content, if any.

Returns:RandomAccessRead

A RandomAccessRead or null.

Annotations
@Override
Exceptions
IOException:
If the content could not be read
getContentStreamback to summary
public PDStream getContentStream()
getPaintTypeback to summary
public int getPaintType()

This will return the paint type.

Returns:int

The paint type

getPatternTypeback to summary
public int getPatternType()

Implements abstract org.apache.pdfbox.pdmodel.graphics.pattern.PDAbstractPattern.getPatternType.

Doc from org.apache.pdfbox.pdmodel.graphics.pattern.PDAbstractPattern.getPatternType.

This will return the pattern type.

Returns:int

The pattern type

Annotations
@Override
getResourcesback to summary
public PDResources getResources()

Implements org.apache.pdfbox.contentstream.PDContentStream.getResources.

This will get the resources for this pattern. This will return null if no resources are available at this level.

Returns:PDResources

The resources for this pattern.

Annotations
@Override
getTilingTypeback to summary
public int getTilingType()

This will return the tiling type.

Returns:int

The tiling type

getXStepback to summary
public float getXStep()

This will return the XStep value.

Returns:float

The XStep value

getYStepback to summary
public float getYStep()

This will return the YStep value.

Returns:float

The YStep value

setBBoxback to summary
public void setBBox(PDRectangle bbox)

This will set the BBox (bounding box) for this Pattern.

Parameters
bbox:PDRectangle

The new BBox for this Pattern.

setPaintTypeback to summary
public void setPaintType(int paintType)

Overrides org.apache.pdfbox.pdmodel.graphics.pattern.PDAbstractPattern.setPaintType.

This will set the paint type.

Parameters
paintType:int

The new paint type.

Annotations
@Override
setResourcesback to summary
public final void setResources(PDResources resources)

This will set the resources for this pattern.

Parameters
resources:PDResources

The new resources for this pattern.

setTilingTypeback to summary
public void setTilingType(int tilingType)

This will set the tiling type.

Parameters
tilingType:int

The new tiling type.

setXStepback to summary
public void setXStep(float xStep)

This will set the XStep value.

Parameters
xStep:float

The new XStep value.

setYStepback to summary
public void setYStep(float yStep)

This will set the YStep value.

Parameters
yStep:float

The new YStep value.