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
ConstructorsConstructorDescriptionPdfType0Function(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.booleancheckCompatibilityWithColorSpace(PdfColorSpace alternateSpace) Chacks wether the output of the function matches in components with the passed by color space.double[]int[]intgetOrder()int[]getSize()voidsetDecode(double[] decode) voidsetDomain(double[] domain) The valid input domain, input will be clipped to this domain contains a min max pair per input component.voidsetEncode(int[] encode) voidsetOrder(int order) voidsetRange(double[] range) the valid output range, output will be clipped to this range contains a min max pair per output component.voidsetSize(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, normalizeMethods 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:AbstractPdfFunctionChacks wether the output of the function matches in components with the passed by color space.- Specified by:
-
checkCompatibilityWithColorSpacein interfaceIPdfFunction - Overrides:
-
checkCompatibilityWithColorSpacein classAbstractPdfFunction<PdfStream> - Parameters:
-
alternateSpace- The color space to verify against - Returns:
- True when compatible
-
setDomain
public void setDomain(double[] domain) Description copied from class:AbstractPdfFunctionThe 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:
-
setDomainin interfaceIPdfFunction - Overrides:
-
setDomainin classAbstractPdfFunction<PdfStream> - Parameters:
-
domain- the new set of limits
-
setRange
public void setRange(double[] range) Description copied from class:AbstractPdfFunctionthe 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:
-
setRangein interfaceIPdfFunction - Overrides:
-
setRangein classAbstractPdfFunction<PdfStream> - Parameters:
-
range- the new set of limts
-
calculate
public double[] calculate(double[] input) Description copied from interface:IPdfFunctionCalculates 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
-