Top Description Fields Constructors Methods
org.apache.pdfbox.pdmodel.common.function

public Class PDFunctionType4

extends PDFunction
Class Inheritance
Imports
org.apache.pdfbox.cos.COSBase, org.apache.pdfbox.pdmodel.common.PDRange, org.apache.pdfbox.pdmodel.common.function.type4.ExecutionContext, .InstructionSequence, .InstructionSequenceBuilder, .Operators, java.io.IOException, java.nio.charset.StandardCharsets

This class represents a Type 4 (PostScript calculator) function in a PDF document.

See section 3.9.4 of the PDF 1.4 Reference.

Field Summary

Modifier and TypeField and Description
private final InstructionSequence
private static final Operators

Constructor Summary

AccessConstructor and Description
public
PDFunctionType4(COSBase
The function stream.
functionStream
)

Constructor.

Method Summary

Modifier and TypeMethod 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.apache.pdfbox.pdmodel.common.function.PDFunction.eval.

Evaluates the function at the given input.

public int
Inherited from org.apache.pdfbox.pdmodel.common.function.PDFunction:
clipToRangeclipToRangecreategetCOSObjectgetDomainForInputgetNumberOfInputParametersgetNumberOfOutputParametersgetPDStreamgetRangeForOutputgetRangeValuesinterpolatesetDomainValuessetRangeValuestoString

Field Detail

instructionsback to summary
private final InstructionSequence instructions
OPERATORSback to summary
private static final Operators OPERATORS

Constructor Detail

PDFunctionType4back to summary
public PDFunctionType4(COSBase functionStream) throws IOException

Constructor.

Parameters
functionStream:COSBase

The function stream.

Exceptions
IOException:
if an I/O error occurs while reading the function

Method Detail

evalback to summary
public float[] eval(float[] input) throws IOException

Implements abstract org.apache.pdfbox.pdmodel.common.function.PDFunction.eval.

Doc from org.apache.pdfbox.pdmodel.common.function.PDFunction.eval.

Evaluates the function at the given input. ReturnValue = f(input)

Parameters
input:float[]

The array of input values for the function. In many cases will be an array of a single value, but not always.

Returns:float[]

The of outputs the function returns based on those inputs. In many cases will be an array of a single value, but not always.

Annotations
@Override
Exceptions
IOException:
if something went wrong processing the function.
getFunctionTypeback to summary
public int getFunctionType()

Implements abstract org.apache.pdfbox.pdmodel.common.function.PDFunction.getFunctionType.

Doc from org.apache.pdfbox.pdmodel.common.function.PDFunction.getFunctionType.

Returns the function type. Possible values are: 0 - Sampled function 2 - Exponential interpolation function 3 - Stitching function 4 - PostScript calculator function

Returns:int

the function type.

Annotations
@Override