public class Color extends Object
Modifier and Type | Field and Description |
---|---|
protected PdfColorSpace |
colorSpace
The color space of the color
|
protected float[] |
colorValue
The color value of the color
|
Modifier | Constructor and Description |
---|---|
protected |
Color(PdfColorSpace colorSpace,
float[] colorValue)
Creates a Color of certain color space and color value.
|
Modifier and Type | Method and Description |
---|---|
static DeviceRgb |
convertCmykToRgb(DeviceCmyk cmykColor)
Converts
DeviceCmyk color to
DeviceRgb color |
static DeviceCmyk |
convertRgbToCmyk(DeviceRgb rgbColor)
Converts
DeviceRgb color to
DeviceCmyk color |
boolean |
equals(Object o)
Indicates whether the color is equal to the given color.
|
PdfColorSpace |
getColorSpace()
Returns the
color space
to which the color is related. |
float[] |
getColorValue()
Returns the color value of the color
|
int |
getNumberOfComponents()
Returns the number of color value components
|
int |
hashCode() |
static Color |
makeColor(PdfColorSpace colorSpace)
Makes a Color of certain color space.
|
static Color |
makeColor(PdfColorSpace colorSpace,
float[] colorValue)
Makes a Color of certain color space and color value.
|
void |
setColorValue(float[] value)
Sets the color value of the color
|
protected PdfColorSpace colorSpace
protected float[] colorValue
protected Color(PdfColorSpace colorSpace, float[] colorValue)
colorSpace
- the color space to which the created Color object relatescolorValue
- the color value of the created Color objectpublic static Color makeColor(PdfColorSpace colorSpace)
colorSpace
- the color space to which the returned Color object relatespublic static Color makeColor(PdfColorSpace colorSpace, float[] colorValue)
colorSpace
- the color space to which the returned Color object relatescolorValue
- the color value of the returned Color objectpublic static DeviceRgb convertCmykToRgb(DeviceCmyk cmykColor)
DeviceCmyk
color to
DeviceRgb
colorcmykColor
- the DeviceCmyk color which will be converted to DeviceRgb colorpublic static DeviceCmyk convertRgbToCmyk(DeviceRgb rgbColor)
DeviceRgb
color to
DeviceCmyk
colorrgbColor
- the DeviceRgb color which will be converted to DeviceCmyk colorpublic int getNumberOfComponents()
public PdfColorSpace getColorSpace()
color space
to which the color is related.public float[] getColorValue()
public void setColorValue(float[] value)
value
- new color valuepublic boolean equals(Object o)
color space
and color value
are considered during the comparison.Copyright © 1998–2023 Apryse Group NV. All rights reserved.