public class GlColor extends Object
| Modifier and Type | Field and Description |
|---|---|
double |
a
Alpha, 1 is fully opaque, 0 is fully transparent
|
double |
b |
double |
g |
double |
r |
| Constructor and Description |
|---|
GlColor(Color color)
Create opaque color based on passed color.
|
GlColor(Color color,
double alpha)
Create GlColor based on passed Color and alpha
|
GlColor(double r,
double g,
double b)
Create fully opaque GlColor.
|
GlColor(double r,
double g,
double b,
double a)
Create new GlColor
|
GlColor(GlColor color) |
| Modifier and Type | Method and Description |
|---|---|
GlColor |
getMixedWith(GlColor mixing,
double portion)
Create a mixed color from passed color and this color in following fashion:
|
String |
toString() |
public double r
public double g
public double b
public double a
public GlColor(double r,
double g,
double b,
double a)
r - In range <0-1>g - In range <0-1>b - In range <0-1>a - In range <0-1> 0 transparent, 1 opaquepublic GlColor(double r,
double g,
double b)
r - In range <0-1>g - In range <0-1>b - In range <0-1>public GlColor(Color color, double alpha)
color - Basic colora - In range <0-1> 0 transparent, 1 opaquepublic GlColor(Color color)
color - public GlColor(GlColor color)
public GlColor getMixedWith(GlColor mixing, double portion)
this * (1-portion) + mixing * portion
mixing - Color that will be mixed with this one.portion - how much of mixing color will be usedCopyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.