| java.lang.Object com.sun.pdfview.function.PDFFunction com.sun.pdfview.function.FunctionType0
FunctionType0 | public class FunctionType0 extends PDFFunction (Code) | | A sampled function maps input values to output values by interpolating
along a line or cubic between two known values.
|
Method Summary | |
protected void | doFunction(float[] inputs, int inputOffset, float[] outputs, int outputOffset) Map from m input values to n output values.
The number of inputs m must be exactly one half the size of the
domain. | protected int | getBitsPerSample() | protected float | getDecode(int i) | protected float | getEncode(int i) | protected int | getOrder() | protected int | getSample(int[] values, int od) Get a component for a sample given m indices and output
dimension. | protected int | getSize(int dimension) | public static float | interpolate(float x, float xmin, float xmax, float ymin, float ymax) Perform a linear interpolation. | protected void | parse(PDFObject obj) | protected void | setBitsPerSample(int bits) | protected void | setDecode(float[] decode) | protected void | setEncode(float[] encode) | protected void | setOrder(int order) | protected void | setSamples(int[][] samples) | protected void | setSize(int[] size) |
CUBIC_INTERPOLATION | final protected static int CUBIC_INTERPOLATION(Code) | | |
LINEAR_INTERPOLATION | final protected static int LINEAR_INTERPOLATION(Code) | | the valid interpolation methods
|
FunctionType0 | protected FunctionType0()(Code) | | Creates a new instance of FunctionType0
|
doFunction | protected void doFunction(float[] inputs, int inputOffset, float[] outputs, int outputOffset)(Code) | | Map from m input values to n output values.
The number of inputs m must be exactly one half the size of the
domain. The number of outputs should match one half the size of the
range.
Parameters: inputs - an array of m input values Parameters: outputs - an array of size n which will be filledwith the output values, or null to return a new array |
getBitsPerSample | protected int getBitsPerSample()(Code) | | Get the number of bits per sample
|
getDecode | protected float getDecode(int i)(Code) | | Get the decoding for a particular input parameter
Parameters: i - the index into the decoding array, which has size 2 * n.the ith entry in the array has index 2i, 2i + 1 the decoding value if the decoding array is set, or the default |
getEncode | protected float getEncode(int i)(Code) | | Get the encoding for a particular input parameter
Parameters: i - the index into the encoding array, which has size 2 * m.the ith entry in the array has index 2i, 2i + 1 the encoding value if the encoding array is set, or the default |
getOrder | protected int getOrder()(Code) | | Get the interpolation type
|
getSample | protected int getSample(int[] values, int od)(Code) | | Get a component for a sample given m indices and output
dimension.
Parameters: values - an array of m values determining which sampleto select Parameters: od - the output dimension (0 - n) to get the sample in the sample for the given values and index |
getSize | protected int getSize(int dimension)(Code) | | Get the size of a given input dimension
Parameters: dimension - the input dimension to get the size of the number of samples in the given dimension |
interpolate | public static float interpolate(float x, float xmin, float xmax, float ymin, float ymax)(Code) | | Perform a linear interpolation. Given a value x, and two points,
(xmin, ymin), (xmax, ymax), where xmin <= x <= xmax, calculate a value
y on the line from (xmin, ymin) to (xmax, ymax).
Parameters: x - the x value of the input Parameters: xmin - the minimum x value Parameters: ymin - the minimum y value Parameters: xmax - the maximum x value Parameters: ymax - the maximum y value the y value interpolated from the given x |
setBitsPerSample | protected void setBitsPerSample(int bits)(Code) | | Set the number of bits per sample
|
setDecode | protected void setDecode(float[] decode)(Code) | | Set the decode array
|
setEncode | protected void setEncode(float[] encode)(Code) | | Set the encode array
|
setOrder | protected void setOrder(int order)(Code) | | Set the interpolation type
|
setSamples | protected void setSamples(int[][] samples)(Code) | | Set the table of samples
|
setSize | protected void setSize(int[] size)(Code) | | Set the size of all input dimensions
|
|
|