Package com.itextpdf.kernel.pdf.function
Class PdfType4Function
java.lang.Object
com.itextpdf.kernel.pdf.PdfObjectWrapper
com.itextpdf.kernel.pdf.function.AbstractPdfFunction<PdfStream>
com.itextpdf.kernel.pdf.function.PdfType4Function
- All Implemented Interfaces:
-
IPdfFunction
-
Constructor Summary
ConstructorsConstructorDescriptionPdfType4Function(double[] domain, double[] range, byte[] code) PdfType4Function(PdfStream dict) -
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.protected booleanDefines if the object behind this wrapper must be an indirect object in the resultant document.Methods inherited from class com.itextpdf.kernel.pdf.function.AbstractPdfFunction
calculateFromByteArray, calculateFromByteArray, clip, clipInput, clipOutput, getAsPdfObject, getDomain, getFunctionType, getInputSize, getOutputSize, getRange, normalize, setDomain, setRangeMethods inherited from class com.itextpdf.kernel.pdf.PdfObjectWrapper
ensureObjectIsAddedToDocument, ensureUnderlyingObjectHasIndirectReference, flush, getPdfObject, isFlushed, makeIndirect, makeIndirect, markObjectAsIndirect, setForbidRelease, setModified, setPdfObject, unsetForbidRelease
-
Constructor Details
-
PdfType4Function
-
PdfType4Function
public PdfType4Function(double[] domain, double[] range, byte[] code)
-
-
Method Details
-
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
-
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
-
isWrappedObjectMustBeIndirect
protected boolean isWrappedObjectMustBeIndirect()Description copied from class:PdfObjectWrapperDefines if the object behind this wrapper must be an indirect object in the resultant document.
If this method returns true it doesn't necessarily mean that object must be in the indirect state at any moment, but rather defines that when the object will be written to the document it will be transformed into indirect object if it's not indirect yet.
Return value of this method shouldn't depend on any logic, it should return always true or false.- Specified by:
-
isWrappedObjectMustBeIndirectin classPdfObjectWrapper<PdfStream> - Returns:
- true if in the resultant document the object behind the wrapper must be indirect, otherwise false.
-