org.pdfbox.pdmodel.common.function
Class PDStreamFunction
- COSObjectable
public abstract class PDStreamFunction
This class represents a function in a PDF document.
PDStreamFunction
protected PDStreamFunction(PDDocument doc,
int functionType)
Constructor to create a new blank function, should only be called by
subclasses.
doc
- The document that this function is part of.functionType
- An integer describing the function type, only 0,2,3,4
are defined by the PDF sepc.
PDStreamFunction
public PDStreamFunction(PDStream functionDictionary)
Constructor.
functionDictionary
- The prepopulated function dictionary.
getCOSObject
public COSBase getCOSObject()
Convert this standard java object to a COS object.
- getCOSObject in interface COSObjectable
- The cos object that matches this Java object.
getCOSStream
public COSStream getCOSStream()
This will get the underlying array value.
- The cos object that this object wraps.
getDomainForInput
public PDRange getDomainForInput(int n)
This will get the range for a certain input parameter. This is will never
return null. If it is not present then the range 0 to 0 will
be returned.
- getDomainForInput in interface PDFunction
n
- The parameter number to get the domain for.
- The domain range for this component.
getNumberOfInputParameters
public int getNumberOfInputParameters()
This will get the number of input parameters that
have a domain specified.
- getNumberOfInputParameters in interface PDFunction
- The number of input parameters that have a domain
specified.
getNumberOfOutputParameters
public int getNumberOfOutputParameters()
This will get the number of output parameters that
have a range specified. A range for output parameters
is optional so this may return zero for a function
that does have output parameters, this will simply return the
number that have the rnage specified.
- getNumberOfOutputParameters in interface PDFunction
- The number of input parameters that have a range
specified.
getRangeForOutput
public PDRange getRangeForOutput(int n)
This will get the range for a certain output parameters. This is will never
return null. If it is not present then the range 0 to 0 will
be returned.
- getRangeForOutput in interface PDFunction
n
- The output parameter number to get the range for.
- The range for this component.
setDomainForInput
public void setDomainForInput(PDRange range,
int n)
This will set the domain for the input values.
- setDomainForInput in interface PDFunction
range
- The new range for the input.n
- The number of the input parameter to set the domain for.
setRangeForOutput
public void setRangeForOutput(PDRange range,
int n)
This will set the a range for output parameter.
- setRangeForOutput in interface PDFunction
range
- The new range for the output parameter.n
- The ouput parameter number to set the range for.