public class JDFRGBColor extends JDFNumList
JDFNumList.NormComparator, JDFNumList.VolumeComparatorJDFBaseDataTypes.EnumFitsValue| Modifier and Type | Field and Description |
|---|---|
static java.lang.Object |
RGB_BLACK |
EPSILON, MAX_CMYK_COLOR, MAX_LAB_COLOR, MAX_MATRIX_DIMENSION, MAX_RECTANGLE_DIMENSION, MAX_RGB_COLOR, MAX_SHAPE_DIMENSION, MAX_XY_DIMENSION| Constructor and Description |
|---|
JDFRGBColor()
constructs a RGB color with all values set to 0.0 Double
|
JDFRGBColor(double[] rgbArray) |
JDFRGBColor(double r,
double g,
double b)
constructs a new RGB color with the given double values
|
JDFRGBColor(int r,
int g,
int b)
constructs a new RGB color with the given double values
|
JDFRGBColor(JDFRGBColor nl)
constructs a RGB color with all values set via a JDFNumberList
|
JDFRGBColor(java.lang.String s)
constructs a RGB color with all values set via a String
|
JDFRGBColor(java.util.Vector v)
Deprecated.
use typesafe constructors
|
| Modifier and Type | Method and Description |
|---|---|
static JDFRGBColor |
createRGBColor(java.lang.String s)
factory for RGBColors that silently returns null in case of illegal strings also applies some voodo to parse html hex strings
|
double |
getB()
getBlue - returns the blue color
|
int |
getB255()
getBlue - returns the blue color
|
JDFCMYKColor |
getCMYK() |
static double[] |
getCMYKArray(double r,
double g,
double b) |
static double[] |
getCMYKArray(int r,
int g,
int b) |
double |
getG()
getG - returns the green color
|
int |
getG255()
getBlue - returns the green color
|
java.lang.String |
getHTMLColor()
get the html color representation of this color in the format 0xrrggbb;
|
double |
getR()
getR - returns the red color
|
int |
getR255()
getBlue - returns the red color
|
boolean |
isValid()
isValid - true if the size of the vector is 3 and all instances are Double types
|
void |
setB(double blue)
setBlue - sets the blue color
|
void |
setB255(int blue)
setBlue - sets the blue color
|
void |
setG(double green)
setGreen - sets the green color
|
void |
setG255(int green)
setGreen - sets the green color
|
void |
setR(double red)
setR - sets the red color
|
void |
setR255(int red)
setR - sets the red color
|
abs, clone, contains, containsAll, copyNumList, doubleAt, elementAt, equals, getDouble, getDoubleList, getDoubleVector, getIntArray, getString, getString, hashCode, intAt, isValidString, matches, max, min, norm, removeElementAt, replaceElementAt, scale, scale, scaleFromCM, scaleFromCM, scaleFromMM, scaleFromMM, scaleToCM, scaleToCM, scaleToMM, scaleToMM, set, setString, setX, shift, sort, subtract, toString, unify, volumeadd, add, addAll, addAll, addElement, capacity, clear, contains, containsAll, copyInto, elements, ensureCapacity, firstElement, forEach, get, indexOf, indexOf, insertElementAt, isEmpty, iterator, lastElement, lastIndexOf, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeAllElements, removeElement, removeIf, removeRange, replaceAll, retainAll, set, setElementAt, setSize, size, sort, spliterator, subList, toArray, toArray, trimToSizepublic JDFRGBColor()
@Deprecated
public JDFRGBColor(java.util.Vector v)
throws java.util.zip.DataFormatException
v - Vector of Doublejava.util.zip.DataFormatException - - if the Vector has not a valid formatpublic JDFRGBColor(java.lang.String s)
throws java.util.zip.DataFormatException
s - the given Stringjava.util.zip.DataFormatException - - if the String has not a valid formatpublic JDFRGBColor(JDFRGBColor nl)
nl - the given number listjava.util.zip.DataFormatException - - if the String has not a valid formatpublic JDFRGBColor(double r,
double g,
double b)
r - the color redg - the color greenb - the color bluepublic JDFRGBColor(int r,
int g,
int b)
r - the color redg - the color greenb - the color bluepublic JDFRGBColor(double[] rgbArray)
rgbArray - 0-1 r,g,bpublic static JDFRGBColor createRGBColor(java.lang.String s)
s - the string to parsepublic boolean isValid()
throws java.util.zip.DataFormatException
isValid in class JDFNumListjava.util.zip.DataFormatException - - if the Vector has not a valid formatpublic double getR()
public void setR(double red)
red - the red colorpublic void setR255(int red)
red - the red colorpublic double getG()
public void setG(double green)
green - the green colorpublic void setG255(int green)
green - the green colorpublic double getB()
public int getR255()
public int getG255()
public int getB255()
public void setB(double blue)
blue - the blue colorpublic void setB255(int blue)
blue - the blue colorpublic java.lang.String getHTMLColor()
public JDFCMYKColor getCMYK()
public static double[] getCMYKArray(double r,
double g,
double b)
r - g - b - public static double[] getCMYKArray(int r,
int g,
int b)
r - g - b -