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 thePDFGraphics2D
class, onlyEXPONENTIAL_INTERPOLATION
andSTITCHING
are used so far (to support gradient paint implementations).
-
-
Field Summary
Fields Modifier and Type Field Description protected Dictionary
dictionary
The function dictionary.private double[]
domain
The function domain.private FunctionType
functionType
The function type.
-
Constructor Summary
Constructors Modifier Constructor Description protected
Function(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.FunctionType
getFunctionType()
Returns the function type.byte[]
getObjectBytes()
Returns the bytes that go between the 'obj' and 'endobj' in the PDF output for this object.void
setDomain(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 (null
not 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 (null
not permitted).
-
getObjectBytes
public byte[] getObjectBytes()
Returns the bytes that go between the 'obj' and 'endobj' in the PDF output for this object.- Specified by:
getObjectBytes
in classPDFObject
- Returns:
- A byte array.
-
-