T - Either a PdfDictionary or a PdfStream
public abstract class AbstractPdfFunctionPdfDictionary> extends PdfObjectWrapperimplements IPdfFunction
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractPdfFunction(T pdfObject)
Constructs a PdfFunction from an existing PdfObject.
|
protected |
AbstractPdfFunction(T pdfObject, int functionType, double[] domain, double[] range)
Constructs a PdfFunction from a new PdfObject.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
calculateFromByteArray(byte[] bytes, int offset, int length, int wordSizeInputLength, int wordSizeOutputLength)
Performs the calculation in bulk on a set of raw data and returns a new set of raw data.
|
byte[] |
calculateFromByteArray(byte[] bytes, int offset, int length, int wordSizeInputLength, int wordSizeOutputLength, BaseInputOutPutConvertors.IInputConversionFunction inputConvertor, BaseInputOutPutConvertors.IOutputConversionFunction outputConvertor)
Performs the calculation in bulk on a set of raw data and returns a new set of raw data.
|
boolean |
checkCompatibilityWithColorSpace(PdfColorSpace alternateSpace)
Chacks wether the output of the function matches in components with the passed by color space.
|
protected static double[] |
clip(double[] values, double[] limits) |
double[] |
clipInput(double[] input)
Clip input values to the allowed domain.
|
double[] |
clipOutput(double[] input)
Clip output values to the allowed range, if there is a range.
|
PdfObject |
getAsPdfObject() |
double[] |
getDomain()
The valid input domain, input will be clipped to this domain contains a min max pair per input component.
|
int |
getFunctionType()
The function type, (see ISO-320001 Table 38).
|
int |
getInputSize()
The number of input components.
|
int |
getOutputSize()
The number of output components.
|
double[] |
getRange()
the valid output range, output will be clipped to this range contains a min max pair per output component.
|
protected static double[] |
normalize(double[] values, double[] limits) |
void |
setDomain(double[] value)
The valid input domain, input will be clipped to this domain contains a min max pair per input component.
|
void |
setRange(double[] value)
the valid output range, output will be clipped to this range contains a min max pair per output component.
|
ensureObjectIsAddedToDocument, ensureUnderlyingObjectHasIndirectReference, flush, getPdfObject, isFlushed, isWrappedObjectMustBeIndirect, makeIndirect, makeIndirect, markObjectAsIndirect, setForbidRelease, setModified, setPdfObject, unsetForbidReleaseclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcalculateprotected AbstractPdfFunction(T pdfObject, int functionType, double[] domain, double[] range)
pdfObject - The new, empty, object, created in a concrete implementation
functionType - The function type, can be 0, 2, 3 or 4
domain - the valid input domain, input will be clipped to this domain contains a min max pair per input component
range - the valid output range, oputput will be clipped to this range contains a min max pair per output component
protected AbstractPdfFunction(T pdfObject)
pdfObject - Either a PdfDictionary or a PdfStream
public int getFunctionType()
getFunctionType in interface IPdfFunction
public boolean checkCompatibilityWithColorSpace(PdfColorSpace alternateSpace)
checkCompatibilityWithColorSpace in interface IPdfFunction
alternateSpace - The color space to verify against
public int getInputSize()
getInputSize in interface IPdfFunction
public int getOutputSize()
getOutputSize in interface IPdfFunction
public double[] getDomain()
(see ISO-320001 Table 38)
getDomain in interface IPdfFunction
public void setDomain(double[] value)
(see ISO-320001 Table 38)
setDomain in interface IPdfFunction
value - the new set of limits
public double[] getRange()
(see ISO-320001 Table 38)
getRange in interface IPdfFunction
public void setRange(double[] value)
(see ISO-320001 Table 38)
setRange in interface IPdfFunction
value - the new set of limts
public byte[] calculateFromByteArray(byte[] bytes,
int offset,
int length,
int wordSizeInputLength,
int wordSizeOutputLength)
throws IOException
calculateFromByteArray in interface IPdfFunction
bytes - The uninterpreted set of data to be transformed
offset - Where to start converting the data
length - How many of the input bytes should be converted
wordSizeInputLength - How many bytes represents one input value
wordSizeOutputLength - How many bytes represents one output value
IOException - on data reading errors
public byte[] calculateFromByteArray(byte[] bytes,
int offset,
int length,
int wordSizeInputLength,
int wordSizeOutputLength,
BaseInputOutPutConvertors.IInputConversionFunction inputConvertor,
BaseInputOutPutConvertors.IOutputConversionFunction outputConvertor)
throws IOException
calculateFromByteArray in interface IPdfFunction
bytes - The uninterpreted set of data to be transformed
offset - Where to start converting the data
length - How many of the input bytes should be converted
wordSizeInputLength - How many bytes represents one input value
wordSizeOutputLength - How many bytes represents one output value
inputConvertor - a custom input convertor
outputConvertor - a custom output convertor
IOException - on data reading errors
public double[] clipInput(double[] input)
(see ISO-320001 Table 38)
clipInput in interface IPdfFunction
input - the input values to be clipped
public double[] clipOutput(double[] input)
(see ISO-320001 Table 38)
clipOutput in interface IPdfFunction
input - the output values to be clipped
public PdfObject getAsPdfObject()
getAsPdfObject in interface IPdfFunction
protected static double[] clip(double[] values,
double[] limits) protected static double[] normalize(double[] values,
double[] limits) Copyright © 1998–2022 iText Group NV. All rights reserved.