TPTP 4.5.0 Platform Project
Internal API Specification

org.eclipse.tptp.platform.report.igc.brushes.internal
Class GradientBrush

java.lang.Object
  extended by org.eclipse.tptp.platform.report.igc.brushes.internal.GradientBrush
All Implemented Interfaces:
IBrush

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 GradientBrush
extends java.lang.Object
implements IBrush

IBrush implementation for a vertical/horizontal Gradient brush using two colors. Call setBounds() de define where the brush is applied. For more complete gradient brush refer to FullGradientBrush.

See Also:
FullGradientBrush

Field Summary
protected  int dh_
          Deprecated.  
protected  int dw_
          Deprecated.  
protected  int dx_
          Deprecated.  
protected  int dy_
          Deprecated.  
protected  int h_
          Deprecated.  
protected  int rgba1_
          Deprecated.  
protected  int rgba2_
          Deprecated.  
protected  boolean vertical_
          Deprecated.  
protected  int w_
          Deprecated.  
protected  int x_
          Deprecated.  
protected  int y_
          Deprecated.  
 
Constructor Summary
GradientBrush(GradientBrush brush)
          Deprecated. Create a copy of given brush
GradientBrush(int _rgba1, int _rgba2, boolean _vertical)
          Deprecated. Create a gradient brush
 
Method Summary
 void brushBegin(IGC gc, IGCDirect gd)
          Deprecated. Start the filling of a shape.
 void brushEnd()
          Deprecated. End a filling of a shape or line drawing.
 IBrush copyBrush()
          Deprecated.  
 void fillRectNT(IGC gc, IGCDirect gd, int _x, int _y, int _w, int _h)
          Deprecated. Help method for IGC implementor.
 void fillRectWT(IGC gc, IGCDirect gd, int _x, int _y, int _w, int _h)
          Deprecated. Help method for IGC implementor.
 Rect getBounds()
          Deprecated.  
 int getBrushColor(int x, int y, int curr_rgba)
          Deprecated. Brush's RGBA color choice for pixel at location x,y, this pixel have currently the RGBA color curr_rgba.
 int getRGBA1()
          Deprecated.  
 int getRGBA2()
          Deprecated.  
 boolean isVertical()
          Deprecated.  
 void setBounds(int x, int y, int w, int h)
          Deprecated. Change bounds of brush (pixel coordinates).
 void setBounds(IRect r)
          Deprecated. Change bounds of brush (pixel coordinates).
 void setGradient(int rgba1, int rgba2, boolean vertical)
          Deprecated. Change gradient parameters
 void setRGBA(int rgba1, int rgba2)
          Deprecated. Change gradient color but not orientation
 void setRGBA1(int _rgba)
          Deprecated. Change current color of brush
 void setRGBA2(int _rgba)
          Deprecated. Change current color of brush
 void setVertical(boolean _v)
          Deprecated. Change current orientation of gradient brush
 java.lang.String toString()
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

rgba1_

protected int rgba1_
Deprecated. 

rgba2_

protected int rgba2_
Deprecated. 

vertical_

protected boolean vertical_
Deprecated. 

x_

protected int x_
Deprecated. 

y_

protected int y_
Deprecated. 

w_

protected int w_
Deprecated. 

h_

protected int h_
Deprecated. 

dx_

protected int dx_
Deprecated. 

dy_

protected int dy_
Deprecated. 

dw_

protected int dw_
Deprecated. 

dh_

protected int dh_
Deprecated. 
Constructor Detail

GradientBrush

public GradientBrush(int _rgba1,
                     int _rgba2,
                     boolean _vertical)
Deprecated. 
Create a gradient brush


GradientBrush

public GradientBrush(GradientBrush brush)
Deprecated. 
Create a copy of given brush

Method Detail

copyBrush

public IBrush copyBrush()
Deprecated. 
Specified by:
copyBrush in interface IBrush
Returns:
a full copy of this brush

getRGBA1

public int getRGBA1()
Deprecated. 
Returns:
current color of solid brush (or first color of gradient) using RGBA encoding

getRGBA2

public int getRGBA2()
Deprecated. 
Returns:
current second color of gradient brush using RGBA encoding

isVertical

public boolean isVertical()
Deprecated. 
Returns:
current brush type

setRGBA1

public void setRGBA1(int _rgba)
Deprecated. 
Change current color of brush


setRGBA2

public void setRGBA2(int _rgba)
Deprecated. 
Change current color of brush


setVertical

public void setVertical(boolean _v)
Deprecated. 
Change current orientation of gradient brush


setRGBA

public void setRGBA(int rgba1,
                    int rgba2)
Deprecated. 
Change gradient color but not orientation


setGradient

public void setGradient(int rgba1,
                        int rgba2,
                        boolean vertical)
Deprecated. 
Change gradient parameters


getBrushColor

public int getBrushColor(int x,
                         int y,
                         int curr_rgba)
Deprecated. 
Description copied from interface: IBrush
Brush's RGBA color choice for pixel at location x,y, this pixel have currently the RGBA color curr_rgba.

brushStart might be called before.

Specified by:
getBrushColor in interface IBrush
Parameters:
x - x coordinate of point in device coordinate.
y - y coordinate of point in device coordinate.
curr_rgba - current color of point (x,y) in render.
Returns:
color the brush choose for (x,y) point, or curr_rgba for no changement.

brushBegin

public void brushBegin(IGC gc,
                       IGCDirect gd)
Deprecated. 
Description copied from interface: IBrush
Start the filling of a shape. Must be called before getBrushColor(). This is time for brush to convert it parameters expressed in pixel coordinates to device coordinates as caller of getBrushColor() give only device coordinates.

Specified by:
brushBegin in interface IBrush
Parameters:
gc - IGC which request the brush filling.
gd - IGCDirect the brush can use to convert data to device coordinates.

brushEnd

public void brushEnd()
Deprecated. 
Description copied from interface: IBrush
End a filling of a shape or line drawing. Called only if brushBegin have been. This is time to restore pixel coordinate parameter of brush.

Specified by:
brushEnd in interface IBrush

setBounds

public void setBounds(int x,
                      int y,
                      int w,
                      int h)
Deprecated. 
Change bounds of brush (pixel coordinates).


setBounds

public void setBounds(IRect r)
Deprecated. 
Change bounds of brush (pixel coordinates).


getBounds

public Rect getBounds()
Deprecated. 
Returns:
current bounds of brush (pixel coordinates)

toString

public java.lang.String toString()
Deprecated. 
Overrides:
toString in class java.lang.Object

fillRectNT

public void fillRectNT(IGC gc,
                       IGCDirect gd,
                       int _x,
                       int _y,
                       int _w,
                       int _h)
Deprecated. 
Help method for IGC implementor.
Fill rectangle using this brush and gc's methods. This method can be used by any IGC without transparentcy support (NT: no transparency). This method could be used more efficiency is gradient is opaque too. x,y,w,h are in pixel coordinate, brush is started/ended in by this method.

See Also:
fillRectWT

fillRectWT

public void fillRectWT(IGC gc,
                       IGCDirect gd,
                       int _x,
                       int _y,
                       int _w,
                       int _h)
Deprecated. 
Help method for IGC implementor.
Fill rectangle using this brush and gc's methods. This method can be used by any IGC with transparency support (WT: with transparency). If gradient contains is opaque, call fillRectNT() instead. x,y,w,h are in pixel coordinates, brush is started/ended in by this method.

See Also:
fillRectNT

TPTP 4.5.0 Platform Project
Internal API Specification