- java.lang.Object
- 
- java.awt.Graphics
- 
- javax.swing.DebugGraphics
 
 
- 
 public class DebugGraphics extends Graphics Graphics subclass supporting graphics debugging. Overrides most methods from Graphics. DebugGraphics objects are rarely created by hand. They are most frequently created automatically when a JComponent's debugGraphicsOptions are changed using the setDebugGraphicsOptions() method.NOTE: You must turn off double buffering to use DebugGraphics: RepaintManager repaintManager = RepaintManager.currentManager(component); repaintManager.setDoubleBufferingEnabled(false); 
- 
- 
Field SummaryFields Modifier and Type Field Description static intBUFFERED_OPTIONShow buffered operations in a separateFrame.static intFLASH_OPTIONFlash graphics operations.static intLOG_OPTIONLog graphics operations.static intNONE_OPTIONDon't debug graphics operations.
 - 
Constructor SummaryConstructors Constructor Description DebugGraphics()Constructs a new debug graphics context that supports slowed down drawing.DebugGraphics(Graphics graphics)Constructs a debug graphics context from an existing graphics context that supports slowed down drawing.DebugGraphics(Graphics graphics, JComponent component)Constructs a debug graphics context from an existing graphics context that slows down drawing for the specified component.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearRect(int x, int y, int width, int height)OverridesGraphics.clearRect.voidclipRect(int x, int y, int width, int height)OverridesGraphics.clipRect.voidcopyArea(int x, int y, int width, int height, int destX, int destY)OverridesGraphics.copyArea.Graphicscreate()OverridesGraphics.createto return a DebugGraphics object.Graphicscreate(int x, int y, int width, int height)OverridesGraphics.createto return a DebugGraphics object.voiddispose()OverridesGraphics.dispose.voiddraw3DRect(int x, int y, int width, int height, boolean raised)OverridesGraphics.draw3DRect.voiddrawArc(int x, int y, int width, int height, int startAngle, int arcAngle)OverridesGraphics.drawArc.voiddrawBytes(byte[] data, int offset, int length, int x, int y)OverridesGraphics.drawBytes.voiddrawChars(char[] data, int offset, int length, int x, int y)OverridesGraphics.drawChars.booleandrawImage(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, Color bgcolor, ImageObserver observer)OverridesGraphics.drawImage.booleandrawImage(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, ImageObserver observer)OverridesGraphics.drawImage.booleandrawImage(Image img, int x, int y, int width, int height, Color bgcolor, ImageObserver observer)OverridesGraphics.drawImage.booleandrawImage(Image img, int x, int y, int width, int height, ImageObserver observer)OverridesGraphics.drawImage.booleandrawImage(Image img, int x, int y, Color bgcolor, ImageObserver observer)OverridesGraphics.drawImage.booleandrawImage(Image img, int x, int y, ImageObserver observer)OverridesGraphics.drawImage.voiddrawLine(int x1, int y1, int x2, int y2)OverridesGraphics.drawLine.voiddrawOval(int x, int y, int width, int height)OverridesGraphics.drawOval.voiddrawPolygon(int[] xPoints, int[] yPoints, int nPoints)OverridesGraphics.drawPolygon.voiddrawPolyline(int[] xPoints, int[] yPoints, int nPoints)OverridesGraphics.drawPolyline.voiddrawRect(int x, int y, int width, int height)OverridesGraphics.drawRect.voiddrawRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)OverridesGraphics.drawRoundRect.voiddrawString(String aString, int x, int y)OverridesGraphics.drawString.voiddrawString(AttributedCharacterIterator iterator, int x, int y)OverridesGraphics.drawString.voidfill3DRect(int x, int y, int width, int height, boolean raised)OverridesGraphics.fill3DRect.voidfillArc(int x, int y, int width, int height, int startAngle, int arcAngle)OverridesGraphics.fillArc.voidfillOval(int x, int y, int width, int height)OverridesGraphics.fillOval.voidfillPolygon(int[] xPoints, int[] yPoints, int nPoints)OverridesGraphics.fillPolygon.voidfillRect(int x, int y, int width, int height)OverridesGraphics.fillRect.voidfillRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)OverridesGraphics.fillRoundRect.static ColorflashColor()Returns the Color used to flash drawing operations.static intflashCount()Returns the number of times that drawing operations will flash.static intflashTime()Returns the time delay of drawing operation flashing.ShapegetClip()OverridesGraphics.getClip.RectanglegetClipBounds()OverridesGraphics.getClipBounds.ColorgetColor()Returns the Color used for text drawing operations.intgetDebugOptions()Returns the current debugging options for this DebugGraphics.FontgetFont()Returns the Font used for text drawing operations.FontMetricsgetFontMetrics()OverridesGraphics.getFontMetrics.FontMetricsgetFontMetrics(Font f)OverridesGraphics.getFontMetrics.booleanisDrawingBuffer()Returns the drawingBuffer value.static PrintStreamlogStream()Returns the stream to which the DebugGraphics logs drawing operations.voidsetClip(int x, int y, int width, int height)OverridesGraphics.setClip.voidsetClip(Shape clip)OverridesGraphics.setClip.voidsetColor(Color aColor)Sets the color to be used for drawing and filling lines and shapes.voidsetDebugOptions(int options)Enables/disables diagnostic information about every graphics operation.static voidsetFlashColor(Color flashColor)Sets the Color used to flash drawing operations.static voidsetFlashCount(int flashCount)Sets the number of times that drawing operations will flash.static voidsetFlashTime(int flashTime)Sets the time delay of drawing operation flashing.voidsetFont(Font aFont)Sets the Font used for text drawing operations.static voidsetLogStream(PrintStream stream)Sets the stream to which the DebugGraphics logs drawing operations.voidsetPaintMode()OverridesGraphics.setPaintMode.voidsetXORMode(Color aColor)OverridesGraphics.setXORMode.voidtranslate(int x, int y)OverridesGraphics.translate.- 
Methods declared in class java.awt.GraphicsdrawPolygon, fillPolygon, finalize, getClipBounds, getClipRect, hitClip, toString
 
- 
 
- 
- 
- 
Field Detail- 
LOG_OPTIONpublic static final int LOG_OPTION Log graphics operations.- See Also:
- Constant Field Values
 
 - 
FLASH_OPTIONpublic static final int FLASH_OPTION Flash graphics operations.- See Also:
- Constant Field Values
 
 - 
BUFFERED_OPTIONpublic static final int BUFFERED_OPTION Show buffered operations in a separateFrame.- See Also:
- Constant Field Values
 
 - 
NONE_OPTIONpublic static final int NONE_OPTION Don't debug graphics operations.- See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
DebugGraphicspublic DebugGraphics() Constructs a new debug graphics context that supports slowed down drawing.
 - 
DebugGraphicspublic DebugGraphics(Graphics graphics, JComponent component) Constructs a debug graphics context from an existing graphics context that slows down drawing for the specified component.- Parameters:
- graphics- the Graphics context to slow down
- component- the JComponent to draw slowly
 
 - 
DebugGraphicspublic DebugGraphics(Graphics graphics) Constructs a debug graphics context from an existing graphics context that supports slowed down drawing.- Parameters:
- graphics- the Graphics context to slow down
 
 
- 
 - 
Method Detail- 
createpublic Graphics create() OverridesGraphics.createto return a DebugGraphics object.
 - 
createpublic Graphics create(int x, int y, int width, int height) OverridesGraphics.createto return a DebugGraphics object.- Overrides:
- createin class- Graphics
- 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.
- See Also:
- Graphics.translate(int, int),- Graphics.clipRect(int, int, int, int)
 
 - 
setFlashColorpublic static void setFlashColor(Color flashColor) Sets the Color used to flash drawing operations.- Parameters:
- flashColor- the Color used to flash drawing operations
 
 - 
flashColorpublic static Color flashColor() Returns the Color used to flash drawing operations.- Returns:
- the Color used to flash drawing operations
- See Also:
- setFlashColor(java.awt.Color)
 
 - 
setFlashTimepublic static void setFlashTime(int flashTime) Sets the time delay of drawing operation flashing.- Parameters:
- flashTime- the time delay of drawing operation flashing
 
 - 
flashTimepublic static int flashTime() Returns the time delay of drawing operation flashing.- Returns:
- the time delay of drawing operation flashing
- See Also:
- setFlashTime(int)
 
 - 
setFlashCountpublic static void setFlashCount(int flashCount) Sets the number of times that drawing operations will flash.- Parameters:
- flashCount- number of times that drawing operations will flash
 
 - 
flashCountpublic static int flashCount() Returns the number of times that drawing operations will flash.- Returns:
- the number of times that drawing operations will flash
- See Also:
- setFlashCount(int)
 
 - 
setLogStreampublic static void setLogStream(PrintStream stream) Sets the stream to which the DebugGraphics logs drawing operations.- Parameters:
- stream- the stream to which the DebugGraphics logs drawing operations
 
 - 
logStreampublic static PrintStream logStream() Returns the stream to which the DebugGraphics logs drawing operations.- Returns:
- the stream to which the DebugGraphics logs drawing operations
- See Also:
- setLogStream(java.io.PrintStream)
 
 - 
setFontpublic void setFont(Font aFont) Sets the Font used for text drawing operations.- Specified by:
- setFontin class- Graphics
- Parameters:
- aFont- the font.
- See Also:
- Graphics.getFont(),- Graphics.drawString(java.lang.String, int, int),- Graphics.drawBytes(byte[], int, int, int, int),- Graphics.drawChars(char[], int, int, int, int)
 
 - 
getFontpublic Font getFont() Returns the Font used for text drawing operations.- Specified by:
- getFontin class- Graphics
- Returns:
- this graphics context's current font.
- See Also:
- setFont(java.awt.Font)
 
 - 
setColorpublic void setColor(Color aColor) Sets the color to be used for drawing and filling lines and shapes.- Specified by:
- setColorin class- Graphics
- Parameters:
- aColor- the new rendering color.
- See Also:
- Color,- Graphics.getColor()
 
 - 
getColorpublic Color getColor() Returns the Color used for text drawing operations.- Specified by:
- getColorin class- Graphics
- Returns:
- this graphics context's current color.
- See Also:
- setColor(java.awt.Color)
 
 - 
getFontMetricspublic FontMetrics getFontMetrics() OverridesGraphics.getFontMetrics.- Overrides:
- getFontMetricsin class- Graphics
- Returns:
- the font metrics of this graphics context's current font.
- See Also:
- Graphics.getFont(),- FontMetrics,- Graphics.getFontMetrics(Font)
 
 - 
getFontMetricspublic FontMetrics getFontMetrics(Font f) OverridesGraphics.getFontMetrics.- Specified by:
- getFontMetricsin class- Graphics
- Parameters:
- f- the specified font
- Returns:
- the font metrics for the specified font.
- See Also:
- Graphics.getFont(),- FontMetrics,- Graphics.getFontMetrics()
 
 - 
translatepublic void translate(int x, int y)OverridesGraphics.translate.
 - 
setPaintModepublic void setPaintMode() OverridesGraphics.setPaintMode.- Specified by:
- setPaintModein class- Graphics
 
 - 
setXORModepublic void setXORMode(Color aColor) OverridesGraphics.setXORMode.- Specified by:
- setXORModein class- Graphics
- Parameters:
- aColor- the XOR alternation color
 
 - 
getClipBoundspublic Rectangle getClipBounds() OverridesGraphics.getClipBounds.- Specified by:
- getClipBoundsin class- Graphics
- Returns:
- the bounding rectangle of the current clipping area,
              or nullif no clip is set.
- See Also:
- Graphics.getClip(),- Graphics.clipRect(int, int, int, int),- Graphics.setClip(int, int, int, int),- Graphics.setClip(Shape)
 
 - 
clipRectpublic void clipRect(int x, int y, int width, int height)OverridesGraphics.clipRect.- Specified by:
- clipRectin class- Graphics
- 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
- See Also:
- Graphics.setClip(int, int, int, int),- Graphics.setClip(Shape)
 
 - 
setClippublic void setClip(int x, int y, int width, int height)OverridesGraphics.setClip.- Specified by:
- setClipin class- Graphics
- 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.
- See Also:
- Graphics.clipRect(int, int, int, int),- Graphics.setClip(Shape),- Graphics.getClip()
 
 - 
getClippublic Shape getClip() OverridesGraphics.getClip.- Specified by:
- getClipin class- Graphics
- Returns:
- a Shapeobject representing the current clipping area, ornullif no clip is set.
- See Also:
- Graphics.getClipBounds(),- Graphics.clipRect(int, int, int, int),- Graphics.setClip(int, int, int, int),- Graphics.setClip(Shape)
 
 - 
setClippublic void setClip(Shape clip) OverridesGraphics.setClip.- Specified by:
- setClipin class- Graphics
- Parameters:
- clip- the- Shapeto use to set the clip
- See Also:
- Graphics.getClip(),- Graphics.clipRect(int, int, int, int),- Graphics.setClip(int, int, int, int)
 
 - 
drawRectpublic void drawRect(int x, int y, int width, int height)OverridesGraphics.drawRect.- Overrides:
- drawRectin class- Graphics
- 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.
- See Also:
- Graphics.fillRect(int, int, int, int),- Graphics.clearRect(int, int, int, int)
 
 - 
fillRectpublic void fillRect(int x, int y, int width, int height)OverridesGraphics.fillRect.- Specified by:
- fillRectin class- Graphics
- 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.
- See Also:
- Graphics.clearRect(int, int, int, int),- Graphics.drawRect(int, int, int, int)
 
 - 
clearRectpublic void clearRect(int x, int y, int width, int height)OverridesGraphics.clearRect.- Specified by:
- clearRectin class- Graphics
- 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.
- See Also:
- Graphics.fillRect(int, int, int, int),- Graphics.drawRect(int, int, int, int),- Graphics.setColor(java.awt.Color),- Graphics.setPaintMode(),- Graphics.setXORMode(java.awt.Color)
 
 - 
drawRoundRectpublic void drawRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)OverridesGraphics.drawRoundRect.- Specified by:
- drawRoundRectin class- Graphics
- 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.
- See Also:
- Graphics.fillRoundRect(int, int, int, int, int, int)
 
 - 
fillRoundRectpublic void fillRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)OverridesGraphics.fillRoundRect.- Specified by:
- fillRoundRectin class- Graphics
- 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.
- See Also:
- Graphics.drawRoundRect(int, int, int, int, int, int)
 
 - 
drawLinepublic void drawLine(int x1, int y1, int x2, int y2)OverridesGraphics.drawLine.
 - 
draw3DRectpublic void draw3DRect(int x, int y, int width, int height, boolean raised)OverridesGraphics.draw3DRect.- Overrides:
- draw3DRectin class- Graphics
- 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.
- See Also:
- Graphics.fill3DRect(int, int, int, int, boolean)
 
 - 
fill3DRectpublic void fill3DRect(int x, int y, int width, int height, boolean raised)OverridesGraphics.fill3DRect.- Overrides:
- fill3DRectin class- Graphics
- 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.
- See Also:
- Graphics.draw3DRect(int, int, int, int, boolean)
 
 - 
drawOvalpublic void drawOval(int x, int y, int width, int height)OverridesGraphics.drawOval.- Specified by:
- drawOvalin class- Graphics
- 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.
- See Also:
- Graphics.fillOval(int, int, int, int)
 
 - 
fillOvalpublic void fillOval(int x, int y, int width, int height)OverridesGraphics.fillOval.- Specified by:
- fillOvalin class- Graphics
- 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.
- See Also:
- Graphics.drawOval(int, int, int, int)
 
 - 
drawArcpublic void drawArc(int x, int y, int width, int height, int startAngle, int arcAngle)OverridesGraphics.drawArc.- Specified by:
- drawArcin class- Graphics
- 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.
- See Also:
- Graphics.fillArc(int, int, int, int, int, int)
 
 - 
fillArcpublic void fillArc(int x, int y, int width, int height, int startAngle, int arcAngle)OverridesGraphics.fillArc.- Specified by:
- fillArcin class- Graphics
- 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.
- See Also:
- Graphics.drawArc(int, int, int, int, int, int)
 
 - 
drawPolylinepublic void drawPolyline(int[] xPoints, int[] yPoints, int nPoints)OverridesGraphics.drawPolyline.- Specified by:
- drawPolylinein class- Graphics
- Parameters:
- xPoints- an array of x points
- yPoints- an array of y points
- nPoints- the total number of points
- See Also:
- Graphics.drawPolygon(int[], int[], int)
 
 - 
drawPolygonpublic void drawPolygon(int[] xPoints, int[] yPoints, int nPoints)OverridesGraphics.drawPolygon.- Specified by:
- drawPolygonin class- Graphics
- Parameters:
- xPoints- a an array of- xcoordinates.
- yPoints- a an array of- ycoordinates.
- nPoints- a the total number of points.
- See Also:
- Graphics.fillPolygon(int[], int[], int),- Graphics.drawPolyline(int[], int[], int)
 
 - 
fillPolygonpublic void fillPolygon(int[] xPoints, int[] yPoints, int nPoints)OverridesGraphics.fillPolygon.- Specified by:
- fillPolygonin class- Graphics
- Parameters:
- xPoints- a an array of- xcoordinates.
- yPoints- a an array of- ycoordinates.
- nPoints- a the total number of points.
- See Also:
- Graphics.drawPolygon(int[], int[], int)
 
 - 
drawStringpublic void drawString(String aString, int x, int y) OverridesGraphics.drawString.- Specified by:
- drawStringin class- Graphics
- Parameters:
- aString- the string to be drawn.
- x- the x coordinate.
- y- the y coordinate.
- See Also:
- Graphics.drawBytes(byte[], int, int, int, int),- Graphics.drawChars(char[], int, int, int, int)
 
 - 
drawStringpublic void drawString(AttributedCharacterIterator iterator, int x, int y) OverridesGraphics.drawString.- Specified by:
- drawStringin class- Graphics
- Parameters:
- iterator- the iterator whose text is to be drawn
- x- the x coordinate.
- y- the y coordinate.
- See Also:
- Graphics.drawBytes(byte[], int, int, int, int),- Graphics.drawChars(char[], int, int, int, int)
 
 - 
drawBytespublic void drawBytes(byte[] data, int offset, int length, int x, int y)OverridesGraphics.drawBytes.- Overrides:
- drawBytesin class- Graphics
- 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
- See Also:
- Graphics.drawChars(char[], int, int, int, int),- Graphics.drawString(java.lang.String, int, int)
 
 - 
drawCharspublic void drawChars(char[] data, int offset, int length, int x, int y)OverridesGraphics.drawChars.- Overrides:
- drawCharsin class- Graphics
- 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
- See Also:
- Graphics.drawBytes(byte[], int, int, int, int),- Graphics.drawString(java.lang.String, int, int)
 
 - 
drawImagepublic boolean drawImage(Image img, int x, int y, ImageObserver observer) OverridesGraphics.drawImage.- Specified by:
- drawImagein class- Graphics
- Parameters:
- img- the specified image to be drawn. This method does nothing if- imgis null.
- x- the x coordinate.
- y- the y coordinate.
- observer- object to be notified as more of the image is converted.
- Returns:
- falseif the image pixels are still changing;- trueotherwise.
- See Also:
- Image,- ImageObserver,- ImageObserver.imageUpdate(java.awt.Image, int, int, int, int, int)
 
 - 
drawImagepublic boolean drawImage(Image img, int x, int y, int width, int height, ImageObserver observer) OverridesGraphics.drawImage.- Specified by:
- drawImagein class- Graphics
- Parameters:
- img- the specified image to be drawn. This method does nothing if- imgis 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:
- falseif the image pixels are still changing;- trueotherwise.
- See Also:
- Image,- ImageObserver,- ImageObserver.imageUpdate(java.awt.Image, int, int, int, int, int)
 
 - 
drawImagepublic boolean drawImage(Image img, int x, int y, Color bgcolor, ImageObserver observer) OverridesGraphics.drawImage.- Specified by:
- drawImagein class- Graphics
- Parameters:
- img- the specified image to be drawn. This method does nothing if- imgis 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:
- falseif the image pixels are still changing;- trueotherwise.
- See Also:
- Image,- ImageObserver,- ImageObserver.imageUpdate(java.awt.Image, int, int, int, int, int)
 
 - 
drawImagepublic boolean drawImage(Image img, int x, int y, int width, int height, Color bgcolor, ImageObserver observer) OverridesGraphics.drawImage.- Specified by:
- drawImagein class- Graphics
- Parameters:
- img- the specified image to be drawn. This method does nothing if- imgis 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:
- falseif the image pixels are still changing;- trueotherwise.
- See Also:
- Image,- ImageObserver,- ImageObserver.imageUpdate(java.awt.Image, int, int, int, int, int)
 
 - 
drawImagepublic boolean drawImage(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, ImageObserver observer) OverridesGraphics.drawImage.- Specified by:
- drawImagein class- Graphics
- Parameters:
- img- the specified image to be drawn. This method does nothing if- imgis 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:
- falseif the image pixels are still changing;- trueotherwise.
- See Also:
- Image,- ImageObserver,- ImageObserver.imageUpdate(java.awt.Image, int, int, int, int, int)
 
 - 
drawImagepublic boolean drawImage(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, Color bgcolor, ImageObserver observer) OverridesGraphics.drawImage.- Specified by:
- drawImagein class- Graphics
- Parameters:
- img- the specified image to be drawn. This method does nothing if- imgis 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:
- falseif the image pixels are still changing;- trueotherwise.
- See Also:
- Image,- ImageObserver,- ImageObserver.imageUpdate(java.awt.Image, int, int, int, int, int)
 
 - 
copyAreapublic void copyArea(int x, int y, int width, int height, int destX, int destY)OverridesGraphics.copyArea.- Specified by:
- copyAreain class- Graphics
- 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.
 
 - 
disposepublic void dispose() OverridesGraphics.dispose.- Specified by:
- disposein class- Graphics
- See Also:
- Graphics.finalize(),- Component.paint(java.awt.Graphics),- Component.update(java.awt.Graphics),- Component.getGraphics(),- Graphics.create()
 
 - 
isDrawingBufferpublic boolean isDrawingBuffer() Returns the drawingBuffer value.- Returns:
- true if this object is drawing from a Buffer
 
 - 
setDebugOptionspublic void setDebugOptions(int options) Enables/disables diagnostic information about every graphics operation. The value of options indicates how this information should be displayed. LOG_OPTION causes a text message to be printed. FLASH_OPTION causes the drawing to flash several times. BUFFERED_OPTION creates a new Frame that shows each operation on an offscreen buffer. The value of options is bitwise OR'd into the current value. To disable debugging use NONE_OPTION.- Parameters:
- options- indicates how diagnostic information should be displayed
 
 - 
getDebugOptionspublic int getDebugOptions() Returns the current debugging options for this DebugGraphics.- Returns:
- the current debugging options for this DebugGraphics
- See Also:
- setDebugOptions(int)
 
 
- 
 
-