Class FunctionType4
java.lang.Object
org.loboevolution.pdfview.function.PDFFunction
org.loboevolution.pdfview.function.FunctionType4
A PostScript function is represented as a stream containing code written in a small subset of the PostScript language. This reference is taken from the (3200-1:2008:7.10.5)
-
Field Summary
Fields inherited from class org.loboevolution.pdfview.function.PDFFunction
TYPE_0, TYPE_2, TYPE_3, TYPE_4
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
doFunction
(float[] inputs, int inputOffset, float[] outputs, int outputOffset) Subclasses must implement this method to perform the actual function on the given set of data.protected void
Read the function information from a PDF ObjectMethods inherited from class org.loboevolution.pdfview.function.PDFFunction
calculate, calculate, getDomain, getFunction, getNumInputs, getNumOutputs, getRange, interpolate
-
Constructor Details
-
FunctionType4
protected FunctionType4()Creates a new instance of FunctionType4
-
-
Method Details
-
parse
Read the function information from a PDF ObjectRead the function information from a PDF Object
- Specified by:
parse
in classPDFFunction
- Parameters:
obj
- aPDFObject
object.- Throws:
IOException
- if any.
-
doFunction
protected void doFunction(float[] inputs, int inputOffset, float[] outputs, int outputOffset) Subclasses must implement this method to perform the actual function on the given set of data. Note that the inputs are guaranteed to be clipped to the domain, while the outputs will be automatically clipped to the range after being returned from this function.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.
- Specified by:
doFunction
in classPDFFunction
- Parameters:
inputs
- an array ofinvalid reference
float
inputOffset
- the offset into the inputs array to read fromoutputs
- guaranteed to be at least as big asgetNumOutputs()
, but not yet clipped to domainoutputOffset
- the offset into the output array to write to
-