|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdiewald_CV_kit.utility.PixelColor
public final class PixelColor
a class to generate/analyse colors in a fast way.
Constructor Summary | |
---|---|
PixelColor(int rgba)
|
|
PixelColor(int r,
int g,
int b)
|
|
PixelColor(int r,
int g,
int b,
int a)
|
Method Summary | |
---|---|
int |
alpha()
|
static int |
alpha(int rgba)
|
int |
blue()
|
static int |
blue(int rgba)
|
static float |
brighntess(float r,
float g,
float b)
|
static float |
brighntess(int rgb)
|
static int |
color(int gray)
|
static int |
color(int gray,
int a)
|
static int |
color(int r,
int g,
int b)
|
static int |
color(int r,
int g,
int b,
int a)
|
int |
getCol()
|
int |
green()
|
static int |
green(int rgba)
|
static int |
hsb2rgb(float h,
float s,
float b)
converts a hsb-value (hue, saturation, brightness) value, to an rgb-value. |
static float[] |
hsb2rgb(float h,
float s,
float b,
float[] rgb)
converts a hsb-value (hue, saturation, brightness) value, to an rgb-value. |
static float |
hue(float r,
float g,
float b)
|
static float |
hue(int rgb)
|
int |
red()
|
static int |
red(int rgba)
|
static float[] |
rgb2hsb(float r,
float g,
float b,
float[] hsb)
|
static float[] |
rgb2hsb(int rgb,
float[] hsb)
converts a rgb-value (single integer) value, to an hsb-value. |
static float |
saturation(float r,
float g,
float b)
|
static float |
saturation(int rgb)
|
void |
setA(int a)
|
void |
setB(int b)
|
void |
setCol(int rgba)
|
void |
setCol(int r,
int g,
int b)
|
void |
setCol(int r,
int g,
int b,
int a)
|
void |
setG(int g)
|
void |
setR(int r)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PixelColor(int rgba)
public PixelColor(int r, int g, int b)
public PixelColor(int r, int g, int b, int a)
Method Detail |
---|
public final void setCol(int rgba)
public final void setCol(int r, int g, int b)
public final void setCol(int r, int g, int b, int a)
public final void setR(int r)
public final void setG(int g)
public final void setB(int b)
public final void setA(int a)
public final int red()
public final int green()
public final int blue()
public final int alpha()
public final int getCol()
public final String toString()
toString
in class Object
public static final int color(int r, int g, int b, int a)
public static final int color(int r, int g, int b)
public static final int color(int gray, int a)
public static final int color(int gray)
public static final int alpha(int rgba)
public static final int red(int rgba)
public static final int green(int rgba)
public static final int blue(int rgba)
public static final float[] rgb2hsb(int rgb, float[] hsb)
rgb
- an red-color
public static final float[] rgb2hsb(float r, float g, float b, float[] hsb)
public static final float hue(int rgb)
public static final float hue(float r, float g, float b)
public static final float saturation(int rgb)
public static final float saturation(float r, float g, float b)
public static final float brighntess(int rgb)
public static final float brighntess(float r, float g, float b)
public static final float[] hsb2rgb(float h, float s, float b, float[] rgb)
h
- hues
- saturationb
- brightnessrgb
- array (size has to be 3), to save the values
if rgb == null, a new array will be generated
which will slow down execution!!!
public static final int hsb2rgb(float h, float s, float b)
h
- hues
- saturationb
- brightness
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |