org.jhotdraw.color
Class CIEXYChromaticityDiagramImageProducer
- java.lang.Object
-
- java.awt.image.MemoryImageSource
-
- org.jhotdraw.color.CIEXYChromaticityDiagramImageProducer
-
- All Implemented Interfaces:
- java.awt.image.ImageProducer
public class CIEXYChromaticityDiagramImageProducer extends java.awt.image.MemoryImageSourceProduces a CIE xy Chromaticity Diagram.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).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classCIEXYChromaticityDiagramImageProducer.OutsideGamutHandling
-
Constructor Summary
Constructors Constructor and Description CIEXYChromaticityDiagramImageProducer(int w, int h)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidgenerateImage()float[]getColorAt(int x, int y)java.awt.PointgetColorLocation(java.awt.Color c)java.awt.PointgetColorLocation(float[] components)intgetHeight()intgetWidth()booleanneedsGeneration()voidregenerateDiagram()voidtoRGB(float[] ciexyz, float[] rgb)
-
-
-
Constructor Detail
-
CIEXYChromaticityDiagramImageProducer
public CIEXYChromaticityDiagramImageProducer(int w, int h)
-
-
Method Detail
-
needsGeneration
public boolean needsGeneration()
-
regenerateDiagram
public void regenerateDiagram()
-
generateImage
public void generateImage()
-
getColorLocation
@Nullable public java.awt.Point getColorLocation(java.awt.Color c)
-
getColorLocation
@Nullable public java.awt.Point getColorLocation(float[] components)
-
getColorAt
@Nullable public float[] getColorAt(int x, int y)
-
getWidth
public int getWidth()
-
getHeight
public int getHeight()
-
toRGB
public void toRGB(float[] ciexyz, float[] rgb)
-
-
DataMelt 3.0 © DataMelt by jWork.ORG