Module org.sejda.sambox
Class PDCIEDictionaryBasedColorSpace
java.lang.Object
org.sejda.sambox.pdmodel.graphics.color.PDColorSpace
org.sejda.sambox.pdmodel.graphics.color.PDCIEBasedColorSpace
org.sejda.sambox.pdmodel.graphics.color.PDCIEDictionaryBasedColorSpace
- All Implemented Interfaces:
COSObjectable
CIE-based colour spaces that use a dictionary.
- Author:
- Ben Litchfield, John Hewson
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected COSDictionaryprotected floatprotected floatprotected floatFields inherited from class org.sejda.sambox.pdmodel.graphics.color.PDColorSpace
array -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreates a new CalRGB color space using the given COS array.protectedPDCIEDictionaryBasedColorSpace(COSName cosName) -
Method Summary
Modifier and TypeMethodDescriptionprotected float[]convXYZtoRGB(float x, float y, float z) final PDTristimulusThis will return the BlackPoint tristimulus.final PDTristimulusThis will return the whitepoint tristimulus.voidsetBlackPoint(PDTristimulus blackpoint) This will set the BlackPoint tristimulus.voidsetWhitePoint(PDTristimulus whitepoint) This will set the whitepoint tristimulus.Methods inherited from class org.sejda.sambox.pdmodel.graphics.color.PDCIEBasedColorSpace
toRawImage, toRGBImage, toStringMethods inherited from class org.sejda.sambox.pdmodel.graphics.color.PDColorSpace
create, create, create, getCOSObject, getDefaultDecode, getInitialColor, getName, getNumberOfComponents, isAllowedCache, toRawImage, toRGB, toRGBImageAWT
-
Field Details
-
dictionary
-
wpX
protected float wpX -
wpY
protected float wpY -
wpZ
protected float wpZ
-
-
Constructor Details
-
PDCIEDictionaryBasedColorSpace
-
PDCIEDictionaryBasedColorSpace
Creates a new CalRGB color space using the given COS array.- Parameters:
rgb- the cos array which represents this color space
-
-
Method Details
-
convXYZtoRGB
protected float[] convXYZtoRGB(float x, float y, float z) -
getWhitepoint
This will return the whitepoint tristimulus. As this is a required field this will never return null. A default of 1,1,1 will be returned if the pdf does not have any values yet.- Returns:
- the whitepoint tristimulus
-
getBlackPoint
This will return the BlackPoint tristimulus. This is an optional field but has defaults so this will never return null. A default of 0,0,0 will be returned if the pdf does not have any values yet.- Returns:
- the blackpoint tristimulus
-
setWhitePoint
This will set the whitepoint tristimulus. As this is a required field this null should not be passed into this function.- Parameters:
whitepoint- the whitepoint tristimulus
-
setBlackPoint
This will set the BlackPoint tristimulus.- Parameters:
blackpoint- the BlackPoint tristimulus
-