|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.pdfbox.pdmodel.common.function.PDFunction
org.apache.pdfbox.pdmodel.common.function.PDFunctionType0
public class PDFunctionType0
This class represents a type 0 function in a PDF document.
Constructor Summary | |
---|---|
PDFunctionType0(COSBase function)
Constructor. |
Method Summary | |
---|---|
float[] |
eval(float[] input)
Evaluates the function at the given input. |
int |
getBitsPerSample()
Get the number of bits that the output value will take up. |
PDRange |
getDecodeForParameter(int paramNum)
Get the decode for the input parameter. |
PDRange |
getEncodeForParameter(int paramNum)
Get the encode for the input parameter. |
int |
getFunctionType()
Returns the function type. |
int[][] |
getSamples()
Get all sample values of this function. |
COSArray |
getSize()
The "Size" entry, which is the number of samples in each input dimension of the sample table. |
void |
setBitsPerSample(int bps)
Set the number of bits that the output value will take up. |
void |
setDecodeValues(COSArray decodeValues)
This will set the decode values. |
void |
setEncodeValues(COSArray encodeValues)
This will set the encode values. |
Methods inherited from class org.apache.pdfbox.pdmodel.common.function.PDFunction |
---|
clipToRange, clipToRange, create, eval, getCOSObject, getDictionary, getDomainForInput, getNumberOfInputParameters, getNumberOfOutputParameters, getPDStream, getRangeForOutput, getRangeValues, interpolate, setDomainValues, setRangeValues |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PDFunctionType0(COSBase function)
functionStream
- The function .Method Detail |
---|
public int getFunctionType()
getFunctionType
in class PDFunction
public COSArray getSize()
public int[][] getSamples()
public int getBitsPerSample()
public void setBitsPerSample(int bps)
bps
- The number of bits for each output value.public PDRange getEncodeForParameter(int paramNum)
paramNum
- The function parameter number.
public void setEncodeValues(COSArray encodeValues)
range
- The new encode values.public PDRange getDecodeForParameter(int paramNum)
paramNum
- The function parameter number.
public void setDecodeValues(COSArray decodeValues)
range
- The new decode values.public float[] eval(float[] input) throws IOException
eval
in class PDFunction
input
- The array of input values for the function.
In many cases will be an array of a single value, but not always.
IOException
- an IOExcpetion is thrown if something went wrong processing the function.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |