Java Reference
In-Depth Information
public void drawPolygon( int []x, int [] y, int points)
Draws a polygon through the point
(x[0], y[0]), (x[1], y[1]), ..., (x[points - 1], y[points - 1]) .
Always draws a closed polygon. If the fi rst and last points are not equal, it draws a line from the
last to the fi rst point.
public void drawPolyline( int [ ] x, int [ ] y, int points)
Draws a polygon through the point
(x[0], y[0]), (x[1], y[1]), ..., (x[points - 1], y[points - 1]) .
If the fi rst and last points are not equal, the polygon will not be closed.
public abstract void drawRoundRect( int x, int y,
int width, int height, int arcWidth, int arcHeight)
Draws the outline of the specifi ed round-cornered rectangle. ( x , y ) is the location of the
upper-left corner of the enclosing regular rectangle. arcWidth and arcHeight specify the
shape of the round corners. See Chapter 18 for details.
public abstract void drawString(String text, int x, int y)
Draws the text given by the specifi ed string, using this graphics object's current font and
color. The baseline of the leftmost character is at position ( x , y ) in this graphics object's
coordinate system.
public abstract void fillArc( int x, int y,
int width, int height,
int startAngle, int arcSweep)
Fills the partial oval specifi ed by
drawArc(x, y, width, height, startAngle, arcSweep)
public abstract void fillOval( int x, int y,
int width, int height)
Fills the oval specifi ed by
drawOval(x, y, width, height)
public void fillPolygon( int [] x, int [] y, int points)
Fills (with color) the polygon specifi ed by
drawPolygon(x,y,points).
public abstract void fillRoundRect( int x, int y,
int width, int height, int arcWidth, int arcHeight)
Fills the round rectangle specifi ed by
drawRoundRec(x, y, width, height,arcWidth, arcHeight)
public abstract void setFont(Font fontObject)
Sets the current font of the calling Graphics object to fontObject .
 
Search WWH ::




Custom Search