public
void clearRect (
int x,
int y,
int width,
int height)
Overriding: java.awt.Graphics
Overrides Graphics.clearRect.
Parameters:
x | | the x coordinate of the rectangle to clear. |
y | | the y coordinate of the rectangle to clear. |
width | | the width of the rectangle to clear. |
height | | the height of the rectangle to clear. |
public
void clipRect (
int x,
int y,
int width,
int height)
Overriding: java.awt.Graphics
Overrides Graphics.clipRect.
Parameters:
x | | the x coordinate of the rectangle to intersect the clip with |
y | | the y coordinate of the rectangle to intersect the clip with |
width | | the width of the rectangle to intersect the clip with |
height | | the height of the rectangle to intersect the clip with |
public
void copyArea (
int x,
int y,
int width,
int height,
int destX,
int destY)
Overriding: java.awt.Graphics
Overrides Graphics.copyArea.
Parameters:
x | | the x coordinate of the source rectangle. |
y | | the y coordinate of the source rectangle. |
width | | the width of the source rectangle. |
height | | the height of the source rectangle. |
destX | | the horizontal distance to copy the pixels. |
destY | | the vertical distance to copy the pixels. |
public Graphics create ()
Overriding: java.awt.Graphics
Overrides Graphics.create to return a DebugGraphics object.
Returns: a new graphics context that is a copy of
this graphics context.
public
Graphics create (
int x,
int y,
int width,
int height)
Overriding: java.awt.Graphics
Overrides Graphics.create to return a DebugGraphics object.
Parameters:
x | | the x coordinate. |
y | | the y coordinate. |
width | | the width of the clipping rectangle. |
height | | the height of the clipping rectangle. |
Returns: a new graphics context.
public
void draw3DRect (
int x,
int y,
int width,
int height,
boolean raised)
Overriding: java.awt.Graphics
Overrides Graphics.draw3DRect.
Parameters:
x | | the x coordinate of the rectangle to be drawn. |
y | | the y coordinate of the rectangle to be drawn. |
width | | the width of the rectangle to be drawn. |
height | | the height of the rectangle to be drawn. |
raised | | a boolean that determines whether the rectangle
appears to be raised above the surface
or sunk into the surface. |
public
void drawArc (
int x,
int y,
int width,
int height,
int startAngle,
int arcAngle)
Overriding: java.awt.Graphics
Overrides Graphics.drawArc.
Parameters:
x | | the x coordinate of the
upper-left corner of the arc to be drawn. |
y | | the y coordinate of the
upper-left corner of the arc to be drawn. |
width | | the width of the arc to be drawn. |
height | | the height of the arc to be drawn. |
startAngle | | the beginning angle. |
arcAngle | | the angular extent of the arc,
relative to the start angle. |
public
void drawBytes (
byte[] data,
int offset,
int length,
int x,
int y)
Overriding: java.awt.Graphics
Overrides Graphics.drawBytes.
Parameters:
data | | the data to be drawn |
offset | | the start offset in the data |
length | | the number of bytes that are drawn |
x | | the x coordinate of the baseline of the text |
y | | the y coordinate of the baseline of the text |
public
void drawChars (
char[] data,
int offset,
int length,
int x,
int y)
Overriding: java.awt.Graphics
Overrides Graphics.drawChars.
Parameters:
data | | the array of characters to be drawn |
offset | | the start offset in the data |
length | | the number of characters to be drawn |
x | | the x coordinate of the baseline of the text |
y | | the y coordinate of the baseline of the text |
public
boolean drawImage (
Image img,
int x,
int y,
ImageObserver observer)
Overriding: java.awt.Graphics
Overrides Graphics.drawImage.
Parameters:
img | | the specified image to be drawn. This method does
nothing if img is null. |
x | | the x coordinate. |
y | | the y coordinate. |
observer | | object to be notified as more of
the image is converted. |
Returns: false if the image pixels are still changing;
true otherwise.
public
boolean drawImage (
Image img,
int x,
int y,
Color bgcolor,
ImageObserver observer)
Overriding: java.awt.Graphics
Overrides Graphics.drawImage.
Parameters:
img | | the specified image to be drawn. This method does
nothing if img is null. |
x | | the x coordinate. |
y | | the y coordinate. |
bgcolor | | the background color to paint under the
non-opaque portions of the image. |
observer | | object to be notified as more of
the image is converted. |
Returns: false if the image pixels are still changing;
true otherwise.
public
boolean drawImage (
Image img,
int x,
int y,
int width,
int height,
ImageObserver observer)
Overriding: java.awt.Graphics
Overrides Graphics.drawImage.
Parameters:
img | | the specified image to be drawn. This method does
nothing if img is null. |
x | | the x coordinate. |
y | | the y coordinate. |
width | | the width of the rectangle. |
height | | the height of the rectangle. |
observer | | object to be notified as more of
the image is converted. |
Returns: false if the image pixels are still changing;
true otherwise.
public
boolean drawImage (
Image img,
int x,
int y,
int width,
int height,
Color bgcolor,
ImageObserver observer)
Overriding: java.awt.Graphics
Overrides Graphics.drawImage.
Parameters:
img | | the specified image to be drawn. This method does
nothing if img is null. |
x | | the x coordinate. |
y | | the y coordinate. |
width | | the width of the rectangle. |
height | | the height of the rectangle. |
bgcolor | | the background color to paint under the
non-opaque portions of the image. |
observer | | object to be notified as more of
the image is converted. |
Returns: false if the image pixels are still changing;
true otherwise.
public
boolean drawImage (
Image img,
int dx1,
int dy1,
int dx2,
int dy2,
int sx1,
int sy1,
int sx2,
int sy2,
ImageObserver observer)
Overriding: java.awt.Graphics
Overrides Graphics.drawImage.
Parameters:
img | | the specified image to be drawn. This method does
nothing if img is null. |
dx1 | | the x coordinate of the first corner of the
destination rectangle. |
dy1 | | the y coordinate of the first corner of the
destination rectangle. |
dx2 | | the x coordinate of the second corner of the
destination rectangle. |
dy2 | | the y coordinate of the second corner of the
destination rectangle. |
sx1 | | the x coordinate of the first corner of the
source rectangle. |
sy1 | | the y coordinate of the first corner of the
source rectangle. |
sx2 | | the x coordinate of the second corner of the
source rectangle. |
sy2 | | the y coordinate of the second corner of the
source rectangle. |
observer | | object to be notified as more of the image is
scaled and converted. |
Returns: false if the image pixels are still changing;
true otherwise.
public
boolean drawImage (
Image img,
int dx1,
int dy1,
int dx2,
int dy2,
int sx1,
int sy1,
int sx2,
int sy2,
Color bgcolor,
ImageObserver observer)
Overriding: java.awt.Graphics
Overrides Graphics.drawImage.
Parameters:
img | | the specified image to be drawn. This method does
nothing if img is null. |
dx1 | | the x coordinate of the first corner of the
destination rectangle. |
dy1 | | the y coordinate of the first corner of the
destination rectangle. |
dx2 | | the x coordinate of the second corner of the
destination rectangle. |
dy2 | | the y coordinate of the second corner of the
destination rectangle. |
sx1 | | the x coordinate of the first corner of the
source rectangle. |
sy1 | | the y coordinate of the first corner of the
source rectangle. |
sx2 | | the x coordinate of the second corner of the
source rectangle. |
sy2 | | the y coordinate of the second corner of the
source rectangle. |
bgcolor | | the background color to paint under the
non-opaque portions of the image. |
observer | | object to be notified as more of the image is
scaled and converted. |
Returns: false if the image pixels are still changing;
true otherwise.
public
void drawLine (
int x1,
int y1,
int x2,
int y2)
Overriding: java.awt.Graphics
Overrides Graphics.drawLine.
Parameters:
x1 | | the first point's x coordinate. |
y1 | | the first point's y coordinate. |
x2 | | the second point's x coordinate. |
y2 | | the second point's y coordinate. |
public
void drawOval (
int x,
int y,
int width,
int height)
Overriding: java.awt.Graphics
Overrides Graphics.drawOval.
Parameters:
x | | the x coordinate of the upper left
corner of the oval to be drawn. |
y | | the y coordinate of the upper left
corner of the oval to be drawn. |
width | | the width of the oval to be drawn. |
height | | the height of the oval to be drawn. |
public
void drawPolygon (
int[] xPoints,
int[] yPoints,
int nPoints)
Overriding: java.awt.Graphics
Overrides Graphics.drawPolygon.
Parameters:
xPoints | | a an array of x coordinates. |
yPoints | | a an array of y coordinates. |
nPoints | | a the total number of points. |
public
void drawPolyline (
int[] xPoints,
int[] yPoints,
int nPoints)
Overriding: java.awt.Graphics
Overrides Graphics.drawPolyline.
Parameters:
xPoints | | an array of x points |
yPoints | | an array of y points |
nPoints | | the total number of points |
public
void drawRect (
int x,
int y,
int width,
int height)
Overriding: java.awt.Graphics
Overrides Graphics.drawRect.
Parameters:
x | | the x coordinate
of the rectangle to be drawn. |
y | | the y coordinate
of the rectangle to be drawn. |
width | | the width of the rectangle to be drawn. |
height | | the height of the rectangle to be drawn. |
public
void drawRoundRect (
int x,
int y,
int width,
int height,
int arcWidth,
int arcHeight)
Overriding: java.awt.Graphics
Overrides Graphics.drawRoundRect.
Parameters:
x | | the x coordinate of the rectangle to be drawn. |
y | | the y coordinate of the rectangle to be drawn. |
width | | the width of the rectangle to be drawn. |
height | | the height of the rectangle to be drawn. |
arcWidth | | the horizontal diameter of the arc
at the four corners. |
arcHeight | | the vertical diameter of the arc
at the four corners. |
public
void drawString (
String aString,
int x,
int y)
Overriding: java.awt.Graphics
Overrides Graphics.drawString.
Parameters:
aString | | the string to be drawn. |
x | | the x coordinate. |
y | | the y coordinate. |
public
void drawString (
AttributedCharacterIterator iterator,
int x,
int y)
Overriding: java.awt.Graphics
Overrides Graphics.drawString.
Parameters:
iterator | | the iterator whose text is to be drawn |
x | | the x coordinate. |
y | | the y coordinate. |
public
void fill3DRect (
int x,
int y,
int width,
int height,
boolean raised)
Overriding: java.awt.Graphics
Overrides Graphics.fill3DRect.
Parameters:
x | | the x coordinate of the rectangle to be filled. |
y | | the y coordinate of the rectangle to be filled. |
width | | the width of the rectangle to be filled. |
height | | the height of the rectangle to be filled. |
raised | | a boolean value that determines whether the
rectangle appears to be raised above the surface
or etched into the surface. |
public
void fillArc (
int x,
int y,
int width,
int height,
int startAngle,
int arcAngle)
Overriding: java.awt.Graphics
Overrides Graphics.fillArc.
Parameters:
x | | the x coordinate of the
upper-left corner of the arc to be filled. |
y | | the y coordinate of the
upper-left corner of the arc to be filled. |
width | | the width of the arc to be filled. |
height | | the height of the arc to be filled. |
startAngle | | the beginning angle. |
arcAngle | | the angular extent of the arc,
relative to the start angle. |
public
void fillOval (
int x,
int y,
int width,
int height)
Overriding: java.awt.Graphics
Overrides Graphics.fillOval.
Parameters:
x | | the x coordinate of the upper left corner
of the oval to be filled. |
y | | the y coordinate of the upper left corner
of the oval to be filled. |
width | | the width of the oval to be filled. |
height | | the height of the oval to be filled. |
public
void fillPolygon (
int[] xPoints,
int[] yPoints,
int nPoints)
Overriding: java.awt.Graphics
Overrides Graphics.fillPolygon.
Parameters:
xPoints | | a an array of x coordinates. |
yPoints | | a an array of y coordinates. |
nPoints | | a the total number of points. |
public
void fillRect (
int x,
int y,
int width,
int height)
Overriding: java.awt.Graphics
Overrides Graphics.fillRect.
Parameters:
x | | the x coordinate
of the rectangle to be filled. |
y | | the y coordinate
of the rectangle to be filled. |
width | | the width of the rectangle to be filled. |
height | | the height of the rectangle to be filled. |
public
void fillRoundRect (
int x,
int y,
int width,
int height,
int arcWidth,
int arcHeight)
Overriding: java.awt.Graphics
Overrides Graphics.fillRoundRect.
Parameters:
x | | the x coordinate of the rectangle to be filled. |
y | | the y coordinate of the rectangle to be filled. |
width | | the width of the rectangle to be filled. |
height | | the height of the rectangle to be filled. |
arcWidth | | the horizontal diameter
of the arc at the four corners. |
arcHeight | | the vertical diameter
of the arc at the four corners. |
public Shape getClip ()
Overriding: java.awt.Graphics
Overrides Graphics.getClip.
Returns: a Shape object representing the
current clipping area, or null if
no clip is set.
public Rectangle getClipBounds ()
Overriding: java.awt.Graphics
Overrides Graphics.getClipBounds.
Returns: the bounding rectangle of the current clipping area,
or null if no clip is set.
public Color getColor ()
Overriding: java.awt.Graphics
Returns the Color used for text drawing operations.
Returns: this graphics context's current color.
See also:
setColor
public Font getFont ()
Overriding: java.awt.Graphics
Returns the Font used for text drawing operations.
Returns: this graphics context's current font.
See also:
setFont
public FontMetrics getFontMetrics ()
Overriding: java.awt.Graphics
Overrides Graphics.getFontMetrics.
Returns: the font metrics of this graphics
context's current font.
public FontMetrics getFontMetrics (Font f)
Overriding: java.awt.Graphics
Overrides Graphics.getFontMetrics.
Parameters:
Returns: the font metrics for the specified font.
public
void setClip (
Shape clip)
Overriding: java.awt.Graphics
Overrides Graphics.setClip.
Parameters:
clip | | the Shape to use to set the clip |
public
void setClip (
int x,
int y,
int width,
int height)
Overriding: java.awt.Graphics
Overrides Graphics.setClip.
Parameters:
x | | the x coordinate of the new clip rectangle. |
y | | the y coordinate of the new clip rectangle. |
width | | the width of the new clip rectangle. |
height | | the height of the new clip rectangle. |
public
void setColor (
Color aColor)
Overriding: java.awt.Graphics
Sets the color to be used for drawing and filling lines and shapes.
Parameters:
aColor | | the new rendering color. |
public
void setFont (
Font aFont)
Overriding: java.awt.Graphics
Sets the Font used for text drawing operations.
Parameters:
public
void setPaintMode ()
public
void setXORMode (
Color aColor)
Overriding: java.awt.Graphics
Overrides Graphics.setXORMode.
Parameters:
aColor | | the XOR alternation color |
public
void translate (
int x,
int y)
Overriding: java.awt.Graphics
Overrides Graphics.translate.
Parameters:
x | | the x coordinate. |
y | | the y coordinate. |