org.apache.pdfbox.pdmodel.graphics
Class PDShading

java.lang.Object
  extended by org.apache.pdfbox.pdmodel.graphics.PDShading
All Implemented Interfaces:
COSObjectable

public class PDShading
extends Object
implements 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
static String NAME
          The name of this object.
 
Constructor Summary
PDShading()
          Default constructor.
PDShading(COSName name, COSDictionary shading)
          Constructor.
 
Method Summary
 boolean getAntiAlias()
          This will return a boolean flag indicating whether to antialias the shading pattern.
 PDColorSpace getColorSpace()
          This will return the Color Space.
 COSArray getCoords()
          Returns the coordinate array used by several of the gradient types.
 COSBase getCOSObject()
          Convert this standard java object to a COS object.
 COSArray getDomain()
          Returns the Domain array used by several of the gradient types.
 COSArray getExtend()
          Returns the Extend array used by several of the gradient types.
 PDFunction getFunction()
          Returns the function used by several of the gradient types.
 String getName()
          This will return the name of the object.
 COSName getShadingName()
          This will return the name of this particular shading dictionary
 int getShadingType()
          This will return the ShadingType -- an integer between 1 and 7 that specifies the gradient type.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NAME

public static final String NAME
The name of this object.

See Also:
Constant Field Values
Constructor Detail

PDShading

public PDShading()
Default constructor.


PDShading

public PDShading(COSName name,
                 COSDictionary shading)
Constructor.

Parameters:
shading - The shading dictionary.
Method Detail

getName

public String getName()
This will return the name of the object.

Returns:
The name of the object.

getCOSObject

public COSBase getCOSObject()
Convert this standard java object to a COS object.

Specified by:
getCOSObject in interface COSObjectable
Returns:
The cos object that matches this Java object.

getShadingName

public COSName 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

public PDColorSpace getColorSpace()
                           throws IOException
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

public COSArray getCoords()
Returns the coordinate array used by several of the gradient types. Interpretation depends on the ShadingType.

Returns:
The coordinate array.

getFunction

public PDFunction getFunction()
                       throws IOException
Returns the function used by several of the gradient types. Interpretation depends on the ShadingType.

Returns:
The gradient function.
Throws:
IOException

getDomain

public COSArray getDomain()
Returns the Domain array used by several of the gradient types. Interpretation depends on the ShadingType.

Returns:
The Domain array.

getExtend

public COSArray 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

public String toString()

Overrides:
toString in class Object


Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.