|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.sunflow.image.ColorFactory
public final class ColorFactory
Nested Class Summary | |
---|---|
static class |
ColorFactory.ColorSpecificationException
|
Constructor Summary | |
---|---|
ColorFactory()
|
Method Summary | |
---|---|
static Color |
createColor(java.lang.String colorspace,
float... data)
Creates a color value in the renderer's internal color space from a string (representing the color space name) and an array of floating point values. |
static java.lang.String |
getInternalColorspace()
Return the name of the internal color space. |
static int |
getRequiredDataValues(java.lang.String colorspace)
Checks to see how many values are required to specify a color using the given colorspace. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ColorFactory()
Method Detail |
---|
public static java.lang.String getInternalColorspace()
null
in the following methods.
public static int getRequiredDataValues(java.lang.String colorspace)
colorspace
-
public static Color createColor(java.lang.String colorspace, float... data) throws ColorFactory.ColorSpecificationException
RuntimeException
if its parameters are not consistent. Here are
the currently supported color spaces:
"sRGB nonlinear"
- requires 3 values"sRGB linear"
- requires 3 values"XYZ"
- requires 3 valuesblackbody
- requires 1 value (temperature in Kelvins)spectrum [min] [max]
- any number of values (must be
>0), [start] and [stop] is the range over which the spectrum is defined
in nanometers.
colorspace
- color space namedata
- data describing this color
ColorFactory.ColorSpecificationException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |