TPTP 4.5.0 Platform Project
Internal API Specification

org.eclipse.tptp.platform.report.igc.util.internal
Class RGBA

java.lang.Object
  extended by org.eclipse.tptp.platform.report.igc.util.internal.RGBA

Deprecated. As of TPTP 4.5.0, use the TPTP Business Intelligence and Reporting Tools (BIRT) reporting infrastructure (org.eclipse.tptp.platform.report.birt).

public class RGBA
extends java.lang.Object

Store RGBA color.
RGBA is a 32 bits colors packed in a java int, including alpha channel, all value are in range 0..255.
Alpha of 0 means fully transparent, 255 is opaque.
Red mask is 0xFF000000 (take care of sign shifting, please)
Green mask is 0x00FF0000
Blue mask is 0x0000FF00
Alpha mask if 0x000000FF


Field Summary
protected  int a_
          Deprecated.  
protected  int b_
          Deprecated.  
static int BLACK
          Deprecated.  
static int BLUE
          Deprecated.  
static int CYAN
          Deprecated.  
static int DARK_BLUE
          Deprecated.  
static int DARK_GRAY
          Deprecated.  
static int DARK_GREEN
          Deprecated.  
static int DARK_RED
          Deprecated.  
protected  int g_
          Deprecated.  
static int GREEN
          Deprecated.  
static int LIGHT_GRAY
          Deprecated.  
static int LIGHT_YELLOW
          Deprecated.  
static int MAGENTA
          Deprecated.  
static int OPAQUE
          Deprecated. opaque value for A(lpha) field.
static int ORANGE
          Deprecated.  
protected  int r_
          Deprecated.  
static int RED
          Deprecated.  
static int TRANSPARENT
          Deprecated. transparent value for A(lpha), this is value for transparent color too.
static int WHITE
          Deprecated.  
static int YELLOW
          Deprecated.  
 
Constructor Summary
RGBA()
          Deprecated. Create opaque black
RGBA(int _rgba)
          Deprecated. Create alpha'ed RGB color
RGBA(int _r, int _g, int _b)
          Deprecated. Create opaque RGB color
RGBA(int _r, int _g, int _b, int _a)
          Deprecated. Create alpha'ed RGB colr
 
Method Summary
static int Combine(int _front, int _back)
          Deprecated.  
 void darker(int _clr, float _k)
          Deprecated. Change current color to a darker one, using coefficient 0..1. 0 set same color, 1 set black color.
static int Darker(int _rgba, float _k)
          Deprecated.  
 int get()
          Deprecated.  
static int Get(int _r, int _g, int _b)
          Deprecated.  
static int Get(int _r, int _g, int _b, int _a)
          Deprecated.  
 int getA()
          Deprecated.  
static int GetA(int _rgba)
          Deprecated.  
 int getB()
          Deprecated.  
static int GetB(int _rgba)
          Deprecated.  
 int getG()
          Deprecated.  
static int GetG(int _rgba)
          Deprecated.  
 int getR()
          Deprecated.  
static int GetR(int _rgba)
          Deprecated.  
static int Gradient(int _rgba1, int _rgba2, double _k)
          Deprecated. Return gradient color between _c1 and _c2 using _k value: if _k<= 0 color is _c1; if _k>=1 color is _c2; otherwise compute linear approximation.
static int Gradient(int _rgba1, int _rgba2, double _k, int _ncolors)
          Deprecated.  
 boolean isInvisible()
          Deprecated.  
static boolean IsInvisible(int _rgba)
          Deprecated.  
 boolean isOpaque()
          Deprecated.  
static boolean IsOpaque(int _rgba)
          Deprecated.  
 void lighter(float _k)
          Deprecated. Change current color to a lighter one, using coefficient 0..1, transparency is preserved.
static int Lighter(int _rgba, float _k)
          Deprecated.  
 void set(int _rgba)
          Deprecated.  
 void set(int _r, int _g, int _b, int _a)
          Deprecated.  
 void setA(int v)
          Deprecated.  
 void setB(int v)
          Deprecated.  
 void setG(int v)
          Deprecated.  
 void setR(int v)
          Deprecated.  
static int Shadow(int _rgba, float k_shadow, float k_light, float cos_angle)
          Deprecated.  
static java.lang.String Str(int _rgba)
          Deprecated.  
 void toBW()
          Deprecated. transform current color to black and white preversing Alpha channel
static int ToBW(int _rgba)
          Deprecated. Transform given RGBA color to a Black and White, preserving Alpha channel
 void toNegative()
          Deprecated. transform current color to negative one, preserve alpha channel
static int ToNegative(int _rgba)
          Deprecated. Transform given color to negative one, preserve alpha channel
 void toNegativeBW()
          Deprecated. transform currnet color to negative black and white, presreve alpha channel
static int ToNegativeBW(int _rgba)
          Deprecated. Transform given RGBA color to a Negative Black and White, preserving Alpha channel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WHITE

public static final int WHITE
Deprecated. 
See Also:
Constant Field Values

BLACK

public static final int BLACK
Deprecated. 
See Also:
Constant Field Values

RED

public static final int RED
Deprecated. 
See Also:
Constant Field Values

GREEN

public static final int GREEN
Deprecated. 
See Also:
Constant Field Values

BLUE

public static final int BLUE
Deprecated. 
See Also:
Constant Field Values

YELLOW

public static final int YELLOW
Deprecated. 
See Also:
Constant Field Values

CYAN

public static final int CYAN
Deprecated. 
See Also:
Constant Field Values

MAGENTA

public static final int MAGENTA
Deprecated. 
See Also:
Constant Field Values

LIGHT_GRAY

public static final int LIGHT_GRAY
Deprecated. 
See Also:
Constant Field Values

DARK_GRAY

public static final int DARK_GRAY
Deprecated. 
See Also:
Constant Field Values

LIGHT_YELLOW

public static final int LIGHT_YELLOW
Deprecated. 
See Also:
Constant Field Values

ORANGE

public static final int ORANGE
Deprecated. 
See Also:
Constant Field Values

DARK_RED

public static final int DARK_RED
Deprecated. 
See Also:
Constant Field Values

DARK_GREEN

public static final int DARK_GREEN
Deprecated. 
See Also:
Constant Field Values

DARK_BLUE

public static final int DARK_BLUE
Deprecated. 
See Also:
Constant Field Values

OPAQUE

public static final int OPAQUE
Deprecated. 
opaque value for A(lpha) field.

See Also:
Constant Field Values

TRANSPARENT

public static final int TRANSPARENT
Deprecated. 
transparent value for A(lpha), this is value for transparent color too.

See Also:
Constant Field Values

r_

protected int r_
Deprecated. 

g_

protected int g_
Deprecated. 

b_

protected int b_
Deprecated. 

a_

protected int a_
Deprecated. 
Constructor Detail

RGBA

public RGBA()
Deprecated. 
Create opaque black


RGBA

public RGBA(int _r,
            int _g,
            int _b)
Deprecated. 
Create opaque RGB color


RGBA

public RGBA(int _r,
            int _g,
            int _b,
            int _a)
Deprecated. 
Create alpha'ed RGB colr


RGBA

public RGBA(int _rgba)
Deprecated. 
Create alpha'ed RGB color

Method Detail

isOpaque

public boolean isOpaque()
Deprecated. 

isInvisible

public boolean isInvisible()
Deprecated. 

getR

public int getR()
Deprecated. 

getG

public int getG()
Deprecated. 

getB

public int getB()
Deprecated. 

getA

public int getA()
Deprecated. 

get

public int get()
Deprecated. 

setR

public void setR(int v)
Deprecated. 

setG

public void setG(int v)
Deprecated. 

setB

public void setB(int v)
Deprecated. 

setA

public void setA(int v)
Deprecated. 

set

public void set(int _r,
                int _g,
                int _b,
                int _a)
Deprecated. 

set

public void set(int _rgba)
Deprecated. 

Get

public static int Get(int _r,
                      int _g,
                      int _b)
Deprecated. 
Returns:
encoded RGBA color using OPAQUE as value for alpha channel

Get

public static int Get(int _r,
                      int _g,
                      int _b,
                      int _a)
Deprecated. 
Returns:
encoded RGBA color

IsOpaque

public static boolean IsOpaque(int _rgba)
Deprecated. 

IsInvisible

public static boolean IsInvisible(int _rgba)
Deprecated. 

GetR

public static int GetR(int _rgba)
Deprecated. 
Returns:
red value of given RGBA color

GetG

public static int GetG(int _rgba)
Deprecated. 
Returns:
green value of given RGBA color

GetB

public static int GetB(int _rgba)
Deprecated. 
Returns:
blue value of given RGBA color

GetA

public static int GetA(int _rgba)
Deprecated. 
Returns:
alpha value of given RGBA color

Combine

public static int Combine(int _front,
                          int _back)
Deprecated. 
Parameters:
_front - front color
_back - back color
Returns:
combined color if _front is viewed in front of _back.

Gradient

public static int Gradient(int _rgba1,
                           int _rgba2,
                           double _k)
Deprecated. 
Return gradient color between _c1 and _c2 using _k value: if _k<= 0 color is _c1; if _k>=1 color is _c2; otherwise compute linear approximation.

Parameters:
_rgba1 - color for _k value less or equal to 0
_rgba2 - color for _k value grater or equal to 1
_k - value for linear approximation.

Gradient

public static int Gradient(int _rgba1,
                           int _rgba2,
                           double _k,
                           int _ncolors)
Deprecated. 

Shadow

public static int Shadow(int _rgba,
                         float k_shadow,
                         float k_light,
                         float cos_angle)
Deprecated. 
Parameters:
_rgba - base color to shadowing/lighting
k_shadow - 0..1, 0 means shadow is _rgba, 1 shadow is _black
k_light - 0..1, 0 means light is _rgba, 1 light is white
cos_angle - 0..1, 0 to 0.5 return shadow color, 0.5..1 return light color
Returns:
RGBA color applying k_shadow and k_light on _rgba parameter to create lighter and darker color, then apply cos_angle value as a gradient coefficient.

Str

public static java.lang.String Str(int _rgba)
Deprecated. 
Returns:
hexa decimal string representing RGBA fields "RRGGBBAA"

toBW

public void toBW()
Deprecated. 
transform current color to black and white preversing Alpha channel


ToBW

public static int ToBW(int _rgba)
Deprecated. 
Transform given RGBA color to a Black and White, preserving Alpha channel


toNegativeBW

public void toNegativeBW()
Deprecated. 
transform currnet color to negative black and white, presreve alpha channel


ToNegativeBW

public static int ToNegativeBW(int _rgba)
Deprecated. 
Transform given RGBA color to a Negative Black and White, preserving Alpha channel


toNegative

public void toNegative()
Deprecated. 
transform current color to negative one, preserve alpha channel


ToNegative

public static int ToNegative(int _rgba)
Deprecated. 
Transform given color to negative one, preserve alpha channel


lighter

public void lighter(float _k)
Deprecated. 
Change current color to a lighter one, using coefficient 0..1, transparency is preserved. Value of 0 set same color, value of 1 set white.


Lighter

public static int Lighter(int _rgba,
                          float _k)
Deprecated. 
Returns:
lighter color than given one, using coefficient 0..1, transparency is preserved. Value of 0 return same color, value of 1 return white.

darker

public void darker(int _clr,
                   float _k)
Deprecated. 
Change current color to a darker one, using coefficient 0..1. 0 set same color, 1 set black color.


Darker

public static int Darker(int _rgba,
                         float _k)
Deprecated. 
Returns:
darker color than given one, using coefficient 0..1. 0 return same color, 1 return black color.

TPTP 4.5.0 Platform Project
Internal API Specification