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

public Class PDShadingPattern

extends PDAbstractPattern
Class Inheritance
Imports
java.io.IOException, org.apache.pdfbox.cos.COSDictionary, .COSName, org.apache.pdfbox.pdmodel.graphics.state.PDExtendedGraphicsState, org.apache.pdfbox.pdmodel.graphics.shading.PDShading

A shading pattern dictionary.

Field Summary

Modifier and TypeField and Description
private PDExtendedGraphicsState
private PDShading
Inherited from org.apache.pdfbox.pdmodel.graphics.pattern.PDAbstractPattern:
TYPE_SHADING_PATTERNTYPE_TILING_PATTERN

Constructor Summary

AccessConstructor and Description
public
PDShadingPattern()

Creates a new shading pattern.

public
PDShadingPattern(COSDictionary
The COSDictionary for this pattern resource.
resourceDictionary
)

Creates a new shading pattern from the given COS dictionary.

Method Summary

Modifier and TypeMethod and Description
public PDExtendedGraphicsState

Returns:

The extended graphics state for this pattern.
getExtendedGraphicsState
()

This will get the external graphics state for this pattern.

public int
public PDShading

Returns:

The shading resources for this pattern.
getShading
()

This will get the shading resources for this pattern.

public void
setExtendedGraphicsState(PDExtendedGraphicsState
The new extended graphics state for this pattern.
extendedGraphicsState
)

This will set the external graphics state for this pattern.

public void
setShading(PDShading
The new shading resources for this pattern.
shadingResources
)

This will set the shading resources for this pattern.

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

Field Detail

extendedGraphicsStateback to summary
private PDExtendedGraphicsState extendedGraphicsState
shadingback to summary
private PDShading shading

Constructor Detail

PDShadingPatternback to summary
public PDShadingPattern()

Creates a new shading pattern.

PDShadingPatternback to summary
public PDShadingPattern(COSDictionary resourceDictionary)

Creates a new shading pattern from the given COS dictionary.

Parameters
resourceDictionary:COSDictionary

The COSDictionary for this pattern resource.

Method Detail

getExtendedGraphicsStateback to summary
public PDExtendedGraphicsState getExtendedGraphicsState()

This will get the external graphics state for this pattern.

Returns:PDExtendedGraphicsState

The extended graphics state for this pattern.

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
getShadingback to summary
public PDShading getShading() throws IOException

This will get the shading resources for this pattern.

Returns:PDShading

The shading resources for this pattern.

Exceptions
IOException:
if something went wrong
setExtendedGraphicsStateback to summary
public void setExtendedGraphicsState(PDExtendedGraphicsState extendedGraphicsState)

This will set the external graphics state for this pattern.

Parameters
extendedGraphicsState:PDExtendedGraphicsState

The new extended graphics state for this pattern.

setShadingback to summary
public void setShading(PDShading shadingResources)

This will set the shading resources for this pattern.

Parameters
shadingResources:PDShading

The new shading resources for this pattern.