public class DeviceColor extends AbstractValue
Modifier and Type | Field and Description |
---|---|
protected float[] |
colors
The colors.
|
protected int |
count
The color count.
|
static java.lang.String |
DEVICE_CMYK_COLOR_FUNCTION |
static java.lang.String |
DEVICE_GRAY_COLOR_FUNCTION |
static java.lang.String |
DEVICE_NCHANNEL_COLOR_FUNCTION |
static java.lang.String |
DEVICE_RGB_COLOR_FUNCTION |
protected boolean |
nChannel |
Constructor and Description |
---|
DeviceColor(boolean nChannel)
Creates a new DeviceColor.
|
Modifier and Type | Method and Description |
---|---|
void |
append(float c)
Appends a color to the list.
|
float |
getColor(int i)
Returns the color at the given index.
|
java.lang.String |
getCssText()
A string representation of the current value.
|
short |
getCssValueType()
Implements
Value.getCssValueType() . |
int |
getNumberOfColors()
Returns the number of colors.
|
boolean |
isNChannel()
Indicates whether this color uses an N-Channel color space.
|
java.lang.String |
toString() |
createDOMException, getBlue, getBottom, getFloatValue, getGreen, getIdentifier, getLeft, getLength, getListStyle, getPrimitiveType, getRed, getRight, getSeparator, getStringValue, getTop, item
public static final java.lang.String DEVICE_GRAY_COLOR_FUNCTION
public static final java.lang.String DEVICE_RGB_COLOR_FUNCTION
public static final java.lang.String DEVICE_CMYK_COLOR_FUNCTION
public static final java.lang.String DEVICE_NCHANNEL_COLOR_FUNCTION
protected boolean nChannel
protected int count
protected float[] colors
public DeviceColor(boolean nChannel)
nChannel
- true for a device-nchannel() color, false for Gray, RGB and CMYKpublic short getCssValueType()
Value.getCssValueType()
.getCssValueType
in interface Value
getCssValueType
in class AbstractValue
public boolean isNChannel()
public int getNumberOfColors() throws DOMException
DOMException
public float getColor(int i) throws DOMException
DOMException
public java.lang.String getCssText()
public void append(float c)
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2022 Apache Software Foundation. All Rights Reserved.