Class Function
java.lang.Object
com.orsonpdf.PDFObject
com.orsonpdf.Function
- Direct Known Subclasses:
ExponentialInterpolationFunction, StitchingFunction
A PDF function object. For the
PDFGraphics2D class, only
EXPONENTIAL_INTERPOLATION and STITCHING are used
so far (to support gradient paint implementations).-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected DictionaryThe function dictionary.private double[]The function domain.private FunctionTypeThe function type. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedFunction(int number, FunctionType functionType) Creates a new function. -
Method Summary
Modifier and TypeMethodDescriptiondouble[]Returns the function domain.Returns the function type.byte[]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 PDFObject
getGeneration, getNumber, getReference, toPDFBytes
-
Field Details
-
functionType
The function type. -
domain
private double[] domainThe function domain. -
dictionary
The function dictionary.
-
-
Constructor Details
-
Function
Creates a new function.- Parameters:
number- the PDF object number.functionType- the function type (nullnot permitted).
-
-
Method Details
-
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.
-