Package com.orsonpdf
Class Function
- java.lang.Object
-
- com.orsonpdf.PDFObject
-
- com.orsonpdf.Function
-
- Direct Known Subclasses:
ExponentialInterpolationFunction,StitchingFunction
public abstract class Function extends PDFObject
A PDF function object. For thePDFGraphics2Dclass, onlyEXPONENTIAL_INTERPOLATIONandSTITCHINGare used so far (to support gradient paint implementations).
-
-
Field Summary
Fields Modifier and Type Field Description protected DictionarydictionaryThe function dictionary.private double[]domainThe function domain.private FunctionTypefunctionTypeThe function type.
-
Constructor Summary
Constructors Modifier Constructor Description protectedFunction(int number, FunctionType functionType)Creates a new function.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double[]getDomain()Returns the function domain.FunctionTypegetFunctionType()Returns the function type.byte[]getObjectBytes()Returns the bytes that go between the 'obj' and 'endobj' in the PDF output for this object.voidsetDomain(double[] domain)Sets the domain for the function.-
Methods inherited from class com.orsonpdf.PDFObject
getGeneration, getNumber, getReference, toPDFBytes
-
-
-
-
Field Detail
-
functionType
private FunctionType functionType
The function type.
-
domain
private double[] domain
The function domain.
-
dictionary
protected Dictionary dictionary
The function dictionary.
-
-
Constructor Detail
-
Function
protected Function(int number, FunctionType functionType)Creates a new function.- Parameters:
number- the PDF object number.functionType- the function type (nullnot permitted).
-
-
Method Detail
-
getFunctionType
public FunctionType getFunctionType()
Returns the function type.- Returns:
- The function type (never
null).
-
getDomain
public double[] getDomain()
Returns the function domain.- Returns:
- The function domain (never
null).
-
setDomain
public void setDomain(double[] domain)
Sets the domain for the function.- Parameters:
domain- the domain (nullnot permitted).
-
getObjectBytes
public byte[] getObjectBytes()
Returns the bytes that go between the 'obj' and 'endobj' in the PDF output for this object.- Specified by:
getObjectBytesin classPDFObject- Returns:
- A byte array.
-
-