GenericPaintpublic abstract class GenericPaint extends Object implements PaintThis 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. |
Methods Summary |
---|
public abstract int | computeAlpha(double x, double y)
| public abstract int | computeBlue(double x, double y)
| public abstract int | computeGreen(double x, double y)
| public abstract int | computeRed(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.PaintContext | createContext(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 int | getTransparency()This paint class allows translucent painting return TRANSLUCENT;
|
|