Class PDFPatternSpace
java.lang.Object
java.awt.color.ColorSpace
com.inductiveautomation.rm.pdf.reader.PDFPatternSpace
- All Implemented Interfaces:
Serializable
The Pattern colorspace is a special colorspace where shadings and tiling patterns can be
declared. PDF treats this like other colorspaces, but it is not a full colorspace as far as awt
is concerned. Awt colorspaces are expected to be able to convert colors between each other, but
this doesn't make sense for patterns or shadings. The conversion methods just generate errors, so
if the colorspace is ever used in a strange place (like an image) it will generate an exception,
and we don't need to always be checking to see if a particular colorspace is appropriate for the
given operation.
To draw in a pattern colorspace, you can ask the colorspace for a Paint object. Classes which implement the java.awt.Paint interface can be created for all the different shading types, as well as for tiling patterns.
- See Also:
-
Field Summary
FieldsFields inherited from class java.awt.color.ColorSpace
CS_CIEXYZ, CS_GRAY, CS_LINEAR_RGB, CS_PYCC, CS_sRGB, TYPE_2CLR, TYPE_3CLR, TYPE_4CLR, TYPE_5CLR, TYPE_6CLR, TYPE_7CLR, TYPE_8CLR, TYPE_9CLR, TYPE_ACLR, TYPE_BCLR, TYPE_CCLR, TYPE_CMY, TYPE_CMYK, TYPE_DCLR, TYPE_ECLR, TYPE_FCLR, TYPE_GRAY, TYPE_HLS, TYPE_HSV, TYPE_Lab, TYPE_Luv, TYPE_RGB, TYPE_XYZ, TYPE_YCbCr, TYPE_Yxy -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloat[]fromCIEXYZ(float[] clrval) float[]fromRGB(float[] rgbvalue) float[]toCIEXYZ(float[] clrvalue) float[]toRGB(float[] colorvalue) Methods inherited from class java.awt.color.ColorSpace
getInstance, getMaxValue, getMinValue, getName, getNumComponents, getType, isCS_sRGB
-
Field Details
-
patternDict
-
tileSpace
-
-
Constructor Details
-
PDFPatternSpace
public PDFPatternSpace() -
PDFPatternSpace
-
-
Method Details
-
toRGB
public float[] toRGB(float[] colorvalue) - Specified by:
toRGBin classColorSpace
-
fromRGB
public float[] fromRGB(float[] rgbvalue) - Specified by:
fromRGBin classColorSpace
-
toCIEXYZ
public float[] toCIEXYZ(float[] clrvalue) - Specified by:
toCIEXYZin classColorSpace
-
fromCIEXYZ
public float[] fromCIEXYZ(float[] clrval) - Specified by:
fromCIEXYZin classColorSpace
-