public interface JHelpPaint
initializePaint(int, int)
to give to the paint information about size of
the bounding box of the shape it will be filled. Then for each pixel inside the shape it will call
obtainColor(int, int)
to know the color to use for a specific point inside the shape. Coordinate are relative to the
shape, in other words (0, 0) is the upper left corner of the bonding box of the shapeModifier and Type | Method and Description |
---|---|
void |
initializePaint(int width,
int height)
Initialize the shape.
|
int |
obtainColor(int x,
int y)
Compute color to use for a specific point.
|
void initializePaint(int width, int height)
width
- Shape bounding box widthheight
- Shape bounding box heightint obtainColor(int x, int y)
x
- X of the pixel coordinatey
- Y of the pixel coordinate