FileDocCategorySizeDatePackage
GenericPaint.javaAPI DocExample4770Sat Jan 24 10:44:36 GMT 2004je3.graphics

GenericPaint

public abstract class GenericPaint extends Object implements Paint
This is an abstract Paint implementation that computes the color of each point to be painted by passing the coordinates of the point to the calling the abstract methods computeRed(), computeGreen(), computeBlue() and computeAlpha(). Subclasses must implement these three methods to perform whatever type of painting is desired. Note that while this class provides great flexibility, it is not very efficient.

Fields Summary
Constructors Summary
Methods Summary
public abstract intcomputeAlpha(double x, double y)

public abstract intcomputeBlue(double x, double y)

public abstract intcomputeGreen(double x, double y)

public abstract intcomputeRed(double x, double y)
These three methods return the red, green, blue, and alpha values of the pixel at appear at the specified user-space coordinates. The return value of each method should be between 0 and 255.

public java.awt.PaintContextcreateContext(java.awt.image.ColorModel cm, java.awt.Rectangle deviceBounds, java.awt.geom.Rectangle2D userBounds, java.awt.geom.AffineTransform xform, java.awt.RenderingHints hints)
This is the main Paint method; all it does is return a PaintContext

	return new GenericPaintContext(xform);
    
public intgetTransparency()
This paint class allows translucent painting

 return TRANSLUCENT;