|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.pdfbox.pdmodel.graphics.shading.PDShadingResources
public abstract class PDShadingResources
This represents resources for a shading.
| Field Summary | |
|---|---|
static int |
SHADING_TYPE1
shading type 1 = function based shading. |
static int |
SHADING_TYPE2
shading type 2 = axial shading. |
static int |
SHADING_TYPE3
shading type 3 = radial shading. |
static int |
SHADING_TYPE4
shading type 4 = Free-Form Gouraud-Shaded Triangle Meshes. |
static int |
SHADING_TYPE5
shading type 5 = Lattice-Form Gouraud-Shaded Triangle Meshes. |
static int |
SHADING_TYPE6
shading type 6 = Coons Patch Meshes. |
static int |
SHADING_TYPE7
shading type 7 = Tensor-Product Patch Meshes. |
| Constructor Summary | |
|---|---|
PDShadingResources()
Default constructor. |
|
PDShadingResources(COSDictionary shadingDictionary)
Constructor using the given shading dictionary. |
|
| Method Summary | |
|---|---|
static PDShadingResources |
create(COSDictionary resourceDictionary)
Create the correct PD Model shading based on the COS base shading. |
float[] |
evalFunction(float inputValue)
Convert the input value using the functions of the shading dictionary. |
float[] |
evalFunction(float[] input)
Convert the input values using the functions of the shading dictionary. |
boolean |
getAntiAlias()
This will return the AntiAlias value. |
COSArray |
getBackground()
This will return the background. |
PDRectangle |
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 shadings's bounding box. |
PDColorSpace |
getColorSpace()
This will get the color space or null if none exists. |
COSDictionary |
getCOSDictionary()
This will get the underlying dictionary. |
COSBase |
getCOSObject()
Convert this standard java object to a COS object. |
PDFunction |
getFunction()
This will return the function used to convert the color values. |
abstract int |
getShadingType()
This will return the shading type. |
String |
getType()
This will return the type. |
void |
setAntiAlias(boolean antiAlias)
This will set the AntiAlias value. |
void |
setBackground(COSArray newBackground)
This will set the background. |
void |
setBBox(PDRectangle newBBox)
This will set the BBox (bounding box) for this Shading. |
void |
setColorSpace(PDColorSpace newColorspace)
This will set the color space for the shading. |
void |
setFunction(COSArray newFunctions)
This will set the functions COSArray for the color conversion. |
void |
setFunction(PDFunction newFunction)
This will set the function for the color conversion. |
void |
setShadingType(int shadingType)
This will set the shading type. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int SHADING_TYPE1
public static final int SHADING_TYPE2
public static final int SHADING_TYPE3
public static final int SHADING_TYPE4
public static final int SHADING_TYPE5
public static final int SHADING_TYPE6
public static final int SHADING_TYPE7
| Constructor Detail |
|---|
public PDShadingResources()
public PDShadingResources(COSDictionary shadingDictionary)
shadingDictionary - The dictionary for this shading.| Method Detail |
|---|
public COSDictionary getCOSDictionary()
public COSBase getCOSObject()
getCOSObject in interface COSObjectablepublic String getType()
public void setShadingType(int shadingType)
shadingType - The new shading type.public abstract int getShadingType()
public void setBackground(COSArray newBackground)
newBackground - The new background.public COSArray getBackground()
public PDRectangle getBBox()
public void setBBox(PDRectangle newBBox)
newBBox - The new BBox.public void setAntiAlias(boolean antiAlias)
antiAlias - The new AntiAlias value.public boolean getAntiAlias()
public PDColorSpace getColorSpace()
throws IOException
IOException - If there is an error getting the colorspace.public void setColorSpace(PDColorSpace newColorspace)
newColorspace - The color space
public static PDShadingResources create(COSDictionary resourceDictionary)
throws IOException
resourceDictionary - the COS shading dictionary
IOException - If we are unable to create the PDShading object.public void setFunction(PDFunction newFunction)
newFunction - The new function.public void setFunction(COSArray newFunctions)
newFunctions - The new COSArray containing all functions.
public PDFunction getFunction()
throws IOException
IOException - If we are unable to create the PDFunction object.
public float[] evalFunction(float inputValue)
throws IOException
inputValue - the input value
IOException - thrown if something went wrong
public float[] evalFunction(float[] input)
throws IOException
input - the input values
IOException - thrown if something went wrong
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||