Class PDShading
java.lang.Object
org.apache.pdfbox.pdmodel.graphics.PDShading
- All Implemented Interfaces:
COSObjectable
This class represents a Shading Pattern color space.
See section 4.6.3 of the PDF 1.7 specification.
- Version:
- $Revision: 1.0 $
- Author:
- Daniel wilson
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.PDShading
(COSName name, COSDictionary shading) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionboolean
This will return a boolean flag indicating whether to antialias the shading pattern.This will return the Color Space.Returns the coordinate array used by several of the gradient types.Convert this standard java object to a COS object.Returns the Domain array used by several of the gradient types.Returns the Extend array used by several of the gradient types.Returns the function used by several of the gradient types.getName()
This will return the name of the object.This will return the name of this particular shading dictionaryint
This will return the ShadingType -- an integer between 1 and 7 that specifies the gradient type.toString()
-
Field Details
-
NAME
The name of this object.- See Also:
-
-
Constructor Details
-
PDShading
public PDShading()Default constructor. -
PDShading
Constructor.- Parameters:
shading
- The shading dictionary.
-
-
Method Details
-
getName
This will return the name of the object.- Returns:
- The name of the object.
-
getCOSObject
Convert this standard java object to a COS object.- Specified by:
getCOSObject
in interfaceCOSObjectable
- Returns:
- The cos object that matches this Java object.
-
getShadingName
This will return the name of this particular shading dictionary- Returns:
- The name of the shading dictionary
-
getShadingType
public int getShadingType()This will return the ShadingType -- an integer between 1 and 7 that specifies the gradient type. Required in all Shading Dictionaries.- Returns:
- The Shading Type
-
getColorSpace
This will return the Color Space. Required in all Shading Dictionaries.- Returns:
- The Color Space of the shading dictionary
- Throws:
IOException
-
getAntiAlias
public boolean getAntiAlias()This will return a boolean flag indicating whether to antialias the shading pattern.- Returns:
- The antialias flag, defaulting to False
-
getCoords
Returns the coordinate array used by several of the gradient types. Interpretation depends on the ShadingType.- Returns:
- The coordinate array.
-
getFunction
Returns the function used by several of the gradient types. Interpretation depends on the ShadingType.- Returns:
- The gradient function.
- Throws:
IOException
-
getDomain
Returns the Domain array used by several of the gradient types. Interpretation depends on the ShadingType.- Returns:
- The Domain array.
-
getExtend
Returns the Extend array used by several of the gradient types. Interpretation depends on the ShadingType. Default is {false, false}.- Returns:
- The Extend array.
-
toString
-