Class PDFunctionType3
java.lang.Object
org.apache.pdfbox.pdmodel.common.function.PDFunction
org.apache.pdfbox.pdmodel.common.function.PDFunctionType3
- All Implemented Interfaces:
COSObjectable
This class represents a Type 3 (stitching) function in a PDF document.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate COSArray
private float[]
private COSArray
private COSArray
private PDFunction[]
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloat[]
eval
(float[] input) Evaluates the function at the given input.Returns all bounds values as COSArray.Returns all encode values as COSArray.private PDRange
getEncodeForParameter
(int n) Get the encode for the input parameter.Returns all functions values as COSArray.int
Returns the function type.Methods inherited from class org.apache.pdfbox.pdmodel.common.function.PDFunction
clipToRange, clipToRange, create, eval, getCOSObject, getDomainForInput, getNumberOfInputParameters, getNumberOfOutputParameters, getPDStream, getRangeForOutput, getRangeValues, interpolate, setDomainValues, setRangeValues, toString
-
Field Details
-
functions
-
encode
-
bounds
-
functionsArray
-
boundsValues
private float[] boundsValues
-
-
Constructor Details
-
PDFunctionType3
Constructor.- Parameters:
functionStream
- The function .
-
-
Method Details
-
getFunctionType
public int getFunctionType()Returns the function type. Possible values are: 0 - Sampled function 2 - Exponential interpolation function 3 - Stitching function 4 - PostScript calculator function- Specified by:
getFunctionType
in classPDFunction
- Returns:
- the function type.
-
eval
Evaluates the function at the given input. ReturnValue = f(input)- Specified by:
eval
in classPDFunction
- Parameters:
input
- The array of input values for the function. In many cases will be an array of a single value, but not always.- Returns:
- The of outputs the function returns based on those inputs. In many cases will be an array of a single value, but not always.
- Throws:
IOException
- if something went wrong processing the function.
-
getFunctions
Returns all functions values as COSArray.- Returns:
- the functions array.
-
getBounds
Returns all bounds values as COSArray.- Returns:
- the bounds array.
-
getEncode
Returns all encode values as COSArray.- Returns:
- the encode array.
-
getEncodeForParameter
Get the encode for the input parameter.- Parameters:
n
- The function parameter number.- Returns:
- The encode parameter range or null if none is set.
-