public class CIEXYChromaticityDiagramImageProducer
extends java.awt.image.MemoryImageSource
The diagram shows a projection of the CIE XYZ cube on a xy plane. The projection is based on the following equations:
x = X / (X + Y + Z), y = Y / (X + Y + Z), z = 1 - x - y.
The equations can be rewritten as:X = (x*(Y+Z)/(1-x), Y = (y*(X+Z)/(1-y).
Modifier and Type | Class and Description |
---|---|
static class |
CIEXYChromaticityDiagramImageProducer.OutsideGamutHandling |
Modifier and Type | Field and Description |
---|---|
protected int |
angularIndex |
protected java.awt.color.ColorSpace |
colorSpace |
protected int |
h |
protected boolean |
isLookupValid |
protected boolean |
isPixelsValid |
protected int[] |
pixels |
protected int |
radialIndex |
protected int |
verticalIndex |
protected float |
verticalValue |
protected int |
w |
Constructor and Description |
---|
CIEXYChromaticityDiagramImageProducer(int w,
int h) |
Modifier and Type | Method and Description |
---|---|
void |
generateImage() |
float[] |
getColorAt(int x,
int y) |
java.awt.Point |
getColorLocation(java.awt.Color c) |
java.awt.Point |
getColorLocation(float[] components) |
int |
getHeight() |
int |
getWidth() |
boolean |
needsGeneration() |
void |
regenerateDiagram() |
void |
toRGB(float[] ciexyz,
float[] rgb) |
protected int[] pixels
protected int w
protected int h
protected java.awt.color.ColorSpace colorSpace
protected int radialIndex
protected int angularIndex
protected int verticalIndex
protected boolean isPixelsValid
protected float verticalValue
protected boolean isLookupValid
public CIEXYChromaticityDiagramImageProducer(int w, int h)
public boolean needsGeneration()
public void regenerateDiagram()
public void generateImage()
public java.awt.Point getColorLocation(java.awt.Color c)
public java.awt.Point getColorLocation(float[] components)
public float[] getColorAt(int x, int y)
public int getWidth()
public int getHeight()
public void toRGB(float[] ciexyz, float[] rgb)