|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnl.tudelft.goal.ut2004.visualizer.timeline.map.GlColor
public class GlColor
AWT provided Color class is not very suitable for OpenGl color manipulation so this class is supposed to remedy it.
Field Summary | |
---|---|
double |
a
Alpha, 1 is fully opaque, 0 is fully transparent |
double |
b
|
double |
g
|
double |
r
|
Constructor Summary | |
---|---|
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)
|
Method Summary | |
---|---|
GlColor |
getMixedWith(GlColor mixing,
double portion)
Create a mixed color from passed color and this color in following fashion: |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public double r
public double g
public double b
public double a
Constructor Detail |
---|
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)
Method Detail |
---|
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 used
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |