Package com.itextpdf.kernel.pdf.function
Class PdfType0Function
java.lang.Object
com.itextpdf.kernel.pdf.PdfObjectWrapper
com.itextpdf.kernel.pdf.function.AbstractPdfFunction<PdfStream>
com.itextpdf.kernel.pdf.function.PdfType0Function
- All Implemented Interfaces:
-
IPdfFunction
-
Constructor Summary
ConstructorDescriptionPdfType0Function
(double[] domain, int[] size, double[] range, int order, int[] encode, double[] decode, int bitsPerSample, byte[] samples) PdfType0Function
(double[] domain, int[] size, double[] range, int order, int bitsPerSample, byte[] samples) PdfType0Function
(float[] domain, int[] size, float[] range, int order, int bitsPerSample, byte[] samples) PdfType0Function
(PdfStream pdfObject) -
Method Summary
Modifier and TypeMethodDescriptiondouble[]
calculate
(double[] input) Calculates one set of input components to one set of output components.boolean
checkCompatibilityWithColorSpace
(PdfColorSpace alternateSpace) Chacks wether the output of the function matches in components with the passed by color space.double[]
int[]
int
getOrder()
int[]
getSize()
void
setDecode
(double[] decode) void
setDomain
(double[] domain) The valid input domain, input will be clipped to this domain contains a min max pair per input component.void
setEncode
(int[] encode) void
setOrder
(int order) void
setRange
(double[] range) the valid output range, output will be clipped to this range contains a min max pair per output component.void
setSize
(int[] size) Methods inherited from class com.itextpdf.kernel.pdf.function.AbstractPdfFunction
calculateFromByteArray, calculateFromByteArray, clip, clipInput, clipOutput, convertFloatArrayToDoubleArray, getAsPdfObject, getDomain, getFunctionType, getInputSize, getOutputSize, getRange, isWrappedObjectMustBeIndirect, normalize
Methods inherited from class com.itextpdf.kernel.pdf.PdfObjectWrapper
ensureObjectIsAddedToDocument, ensureUnderlyingObjectHasIndirectReference, flush, getPdfObject, isFlushed, makeIndirect, makeIndirect, markObjectAsIndirect, setForbidRelease, setModified, setPdfObject, unsetForbidRelease
-
Constructor Details
-
PdfType0Function
-
PdfType0Function
public PdfType0Function(double[] domain, int[] size, double[] range, int order, int bitsPerSample, byte[] samples) -
PdfType0Function
public PdfType0Function(float[] domain, int[] size, float[] range, int order, int bitsPerSample, byte[] samples) -
PdfType0Function
public PdfType0Function(double[] domain, int[] size, double[] range, int order, int[] encode, double[] decode, int bitsPerSample, byte[] samples)
-
-
Method Details
-
getOrder
public int getOrder() -
setOrder
public void setOrder(int order) -
getSize
public int[] getSize() -
setSize
public void setSize(int[] size) -
getEncode
public int[] getEncode() -
setEncode
public void setEncode(int[] encode) -
getDecode
public double[] getDecode() -
setDecode
public void setDecode(double[] decode) -
checkCompatibilityWithColorSpace
Description copied from class:AbstractPdfFunction
Chacks wether the output of the function matches in components with the passed by color space.- Specified by:
-
checkCompatibilityWithColorSpace
in interfaceIPdfFunction
- Overrides:
-
checkCompatibilityWithColorSpace
in classAbstractPdfFunction<PdfStream>
- Parameters:
-
alternateSpace
- The color space to verify against - Returns:
- True when compatible
-
setDomain
public void setDomain(double[] domain) Description copied from class:AbstractPdfFunction
The valid input domain, input will be clipped to this domain contains a min max pair per input component.(see ISO-320001 Table 38)
- Specified by:
-
setDomain
in interfaceIPdfFunction
- Overrides:
-
setDomain
in classAbstractPdfFunction<PdfStream>
- Parameters:
-
domain
- the new set of limits
-
setRange
public void setRange(double[] range) Description copied from class:AbstractPdfFunction
the valid output range, output will be clipped to this range contains a min max pair per output component.(see ISO-320001 Table 38)
- Specified by:
-
setRange
in interfaceIPdfFunction
- Overrides:
-
setRange
in classAbstractPdfFunction<PdfStream>
- Parameters:
-
range
- the new set of limts
-
calculate
public double[] calculate(double[] input) Description copied from interface:IPdfFunction
Calculates one set of input components to one set of output components.- Parameters:
-
input
- The input values size must containIPdfFunction.getInputSize()
items - Returns:
-
an array the size of
IPdfFunction.getOutputSize()
items containing the result
-