| Modifier and Type | Class and Description |
|---|---|
| private class | PDFunctionType0.
Inner class do to an interpolation in the Nth dimension by comparing the content size of N-1 dimensional objects. |
| Modifier and Type | Field and Description |
|---|---|
| private COSArray | decode
An array of 2 x n numbers specifying the linear mapping of sample values into the range appropriate for the function's output values. |
| private COSArray | encode
An array of 2 x m numbers specifying the linear mapping of input values into the domain of the function's sample table. |
| private static final Log | LOG
Log instance. |
| private int[][] | samples
The samples of the function. |
| private COSArray | size
An array of m positive integers specifying the number of samples in each input dimension of the sample table. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public float[] | eval(float[]
The array of input values for the function.
In many cases will be an array of a single value, but not always. input)Implements abstract org. Evaluates the function at the given input. |
| public int | Returns: Number of bits for each output value.Get the number of bits that the output value will take up. |
| public PDRange | Returns: The decode parameter range or null if none is set.The function parameter number. paramNum)Get the decode for the input parameter. |
| private COSArray | |
| public PDRange | Returns: The encode parameter range or null if none is set.The function parameter number. paramNum)Get the encode for the input parameter. |
| private COSArray | |
| public int | getFunctionType()
Implements abstract org. Returns the function type. |
| public int | |
| public COSArray | Returns: A List of java.lang.Integer objects.The "Size" entry, which is the number of samples in each input dimension of the sample table. |
| public void | setBitsPerSample(int
The number of bits for each output value. bps)Set the number of bits that the output value will take up. |
| public void | |
| public void |
| decode | back to summary |
|---|---|
| private COSArray decode An array of 2 x n numbers specifying the linear mapping of sample values into the range appropriate for the function's output values. Default value: same as the value of Range | |
| encode | back to summary |
|---|---|
| private COSArray encode An array of 2 x m numbers specifying the linear mapping of input values into the domain of the function's sample table. Default value: [ 0 (Size0 - 1) 0 (Size1 - 1) ...]. | |
| LOG | back to summary |
|---|---|
| private static final Log LOG Log instance. | |
| samples | back to summary |
|---|---|
| private int[][] samples The samples of the function. | |
| size | back to summary |
|---|---|
| private COSArray size An array of m positive integers specifying the number of samples in each input dimension of the sample table. | |
| PDFunctionType0 | back to summary |
|---|---|
| public PDFunctionType0(COSBase function) Constructor.
| |
| eval | back to summary |
|---|---|
| public float[] eval(float[] input) throws IOException Implements abstract org. Doc from org. Evaluates the function at the given input. ReturnValue = f(input)
| |
| getBitsPerSample | back to summary |
|---|---|
| public int getBitsPerSample() Get the number of bits that the output value will take up. Valid values are 1,2,4,8,12,16,24,32.
| |
| getDecodeForParameter | back to summary |
|---|---|
| public PDRange getDecodeForParameter(int paramNum) Get the decode for the input parameter.
| |
| getDecodeValues | back to summary |
|---|---|
| private COSArray getDecodeValues() Returns all decode values as COSArray.
| |
| getEncodeForParameter | back to summary |
|---|---|
| public PDRange getEncodeForParameter(int paramNum) Get the encode for the input parameter.
| |
| getEncodeValues | back to summary |
|---|---|
| private COSArray getEncodeValues() Returns all encode values as COSArray.
| |
| getFunctionType | back to summary |
|---|---|
| public int getFunctionType() Implements abstract org. Doc from org. Returns the function type. Possible values are: 0 - Sampled function 2 - Exponential interpolation function 3 - Stitching function 4 - PostScript calculator function
| |
| getOrder | back to summary |
|---|---|
| public int getOrder() Get the order of interpolation between samples. Valid values are 1 and 3, specifying linear and cubic spline interpolation, respectively. Default is 1. See p.170 in PDF spec 1.7.
| |
| getSize | back to summary |
|---|---|
| public COSArray getSize() The "Size" entry, which is the number of samples in each input dimension of the sample table.
| |
| setBitsPerSample | back to summary |
|---|---|
| public void setBitsPerSample(int bps) Set the number of bits that the output value will take up. Valid values are 1,2,4,8,12,16,24,32.
| |
| setDecodeValues | back to summary |
|---|---|
| public void setDecodeValues(COSArray decodeValues) This will set the decode values.
| |
| setEncodeValues | back to summary |
|---|---|
| public void setEncodeValues(COSArray encodeValues) This will set the encode values.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final float[] | |
| private final int[] | |
| private final int[] | |
| private final int | |
| private final int |
| Access | Constructor and Description |
|---|---|
| pack-priv | Rinterpol(float[]
the input coordinates input, int[] coordinate of the "ceil" point inputPrev, int[] coordinate of the "floor" point inputNext)Constructor. |
| Modifier and Type | Method and Description |
|---|---|
| private int | Returns: index in flat arraywith coordinates vector)calculate array index (structure described in p.171 PDF spec 1.7) in multiple dimensions. |
| private int[][] | |
| private float[] | Returns: interpolated result samplecoord partially set coordinate (not set from step
upwards); gets fully filled in the last call ("leaf"), where it is
used to get the correct sample coord, int between 0 (first call) and dimension - 1 step)Do a linear interpolation if the two coordinates can be known, or call itself recursively twice. |
| pack-priv float[] |
| in | back to summary |
|---|---|
| private final float[] in | |
| inNext | back to summary |
|---|---|
| private final int[] inNext | |
| inPrev | back to summary |
|---|---|
| private final int[] inPrev | |
| numberOfInputValues | back to summary |
|---|---|
| private final int numberOfInputValues | |
| numberOfOutputValues | back to summary |
|---|---|
| private final int numberOfOutputValues | |
| Rinterpol | back to summary |
|---|---|
| pack-priv Rinterpol(float[] input, int[] inputPrev, int[] inputNext) Constructor.
| |
| calcSampleIndex | back to summary |
|---|---|
| private int calcSampleIndex(int[] vector) calculate array index (structure described in p.171 PDF spec 1.7) in multiple dimensions.
| |
| getSamples | back to summary |
|---|---|
| private int[][] getSamples() Get all sample values of this function.
| |
| rinterpol | back to summary |
|---|---|
| private float[] rinterpol(int[] coord, int step) Do a linear interpolation if the two coordinates can be known, or call itself recursively twice.
| |
| rinterpolate | back to summary |
|---|---|
| pack-priv float[] rinterpolate() Calculate the interpolation.
| |