|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectinfo.monitorenter.gui.util.HSBColor
public class HSBColor
Color that internally works with the Hue Saturation Luminance color space.
| Field Summary | |
|---|---|
protected float |
m_hue
Hue value between 0.0 and 1.0. |
protected float |
m_lum
Luminance value between 0.0 and 1.0. |
protected float |
m_sat
Saturation value between 0.0 and 1.0. |
| Constructor Summary | |
|---|---|
HSBColor(Color rgbcolor)
Creates an instance transformed from the rgb color. |
|
| Method Summary | |
|---|---|
Object |
clone()
Clone implementation. |
boolean |
equals(Object o)
Equals implementation. |
Color |
getRGBColor()
Returns the transformation of this color to the rgb color. |
int |
hashCode()
|
static HSBColor |
rgbToHSB(Color color)
Inspired by float[] java.awt.Color.RGBtoHSB(int r,int g, int b, float[]hsbvals)
except that algorithm is tuned Testing results showed about 25% speed up. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected float m_hue
protected float m_lum
protected float m_sat
| Constructor Detail |
|---|
public HSBColor(Color rgbcolor)
rgbcolor - standard java rgb color.| Method Detail |
|---|
public static HSBColor rgbToHSB(Color color)
float[] java.awt.Color.RGBtoHSB(int r,int g, int b, float[]hsbvals)
except that algorithm is tuned
color - the java.awt.Color (that follows the RGB model) and
should be transformed to a color instance in the
hue-saturation-luminance model.
public Object clone()
Following statements are true:
x.clone() != x
x.clone().getClass() == x.getClass()
x.clone().equals(x)
A deep copy of this HSBColor is returned.
clone in class Objectpublic boolean equals(Object o)
Returns true if :
equals in class Objecto - the other HSBColor instance.
public Color getRGBColor()
public int hashCode()
hashCode in class ObjectObject.hashCode()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||