This class represents a function in a PDF document.
Method from org.apache.pdfbox.pdmodel.common.function.PDStreamFunction Detail: |
public COSBase getCOSObject() {
return function.getCOSObject();
}
Convert this standard java object to a COS object. |
public COSStream getCOSStream() {
return function.getStream();
}
This will get the underlying array value. |
public PDRange getDomainForInput(int n) {
COSArray rangeArray = getRangeArray( "Domain", n );
return new PDRange( rangeArray, 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. |
public int getNumberOfInputParameters() {
COSArray array = getRangeArray( "Domain", 0 );
return array.size() / 2;
}
This will get the number of input parameters that
have a domain specified. |
public int getNumberOfOutputParameters() {
COSArray array = getRangeArray( "Range", 0 );
return array.size() / 2;
}
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. |
public PDRange getRangeForOutput(int n) {
COSArray rangeArray = getRangeArray( "Range", n );
return new PDRange( rangeArray, 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. |
public void setDomainForInput(PDRange range,
int n) {
COSArray rangeArray = getRangeArray("Domain", n );
rangeArray.set( n*2, new COSFloat( range.getMin() ) );
rangeArray.set( n*2+1, new COSFloat( range.getMax() ) );
}
This will set the domain for the input values. |
public void setRangeForOutput(PDRange range,
int n) {
COSArray rangeArray = getRangeArray("Range", n );
rangeArray.set( n*2, new COSFloat( range.getMin() ) );
rangeArray.set( n*2+1, new COSFloat( range.getMax() ) );
}
This will set the a range for output parameter. |