java.awt

Class Graphics2D


public abstract class Graphics2D
extends Graphics

Constructor Summary

Graphics2D()
Default constructor for subclasses.

Method Summary

abstract void
addRenderingHints(Map hints)
abstract void
clip(Shape s)
abstract void
draw(Shape shape)
void
draw3DRect(int x, int y, int width, int height, boolean raised)
abstract void
drawGlyphVector(GlyphVector g, float x, float y)
abstract boolean
drawImage(Image image, AffineTransform xform, ImageObserver obs)
abstract void
drawImage(BufferedImage image, BufferedImageOp op, int x, int y)
abstract void
drawRenderableImage(RenderableImage image, AffineTransform xform)
abstract void
drawRenderedImage(RenderedImage image, AffineTransform xform)
abstract void
drawString(String text, float x, float y)
abstract void
drawString(String text, int x, int y)
Draws the specified string starting at the specified point.
abstract void
drawString(AttributedCharacterIterator iterator, float x, float y)
abstract void
drawString(AttributedCharacterIterator iterator, int x, int y)
abstract void
fill(Shape shape)
void
fill3DRect(int x, int y, int width, int height, boolean raised)
Fills the specified rectangle with a 3D effect
abstract Color
getBackground()
abstract Composite
getComposite()
abstract GraphicsConfiguration
getDeviceConfiguration()
abstract FontRenderContext
getFontRenderContext()
abstract Paint
getPaint()
abstract Object
getRenderingHint(RenderingHints.Key hintKey)
abstract RenderingHints
getRenderingHints()
abstract Stroke
getStroke()
abstract AffineTransform
getTransform()
abstract boolean
hit(Rectangle rect, Shape text, boolean onStroke)
abstract void
rotate(double theta)
abstract void
rotate(double theta, double x, double y)
abstract void
scale(double scaleX, double scaleY)
abstract void
setBackground(Color color)
abstract void
setComposite(Composite comp)
abstract void
setPaint(Paint paint)
abstract void
setRenderingHint(RenderingHints.Key hintKey, Object hintValue)
abstract void
setRenderingHints(Map hints)
abstract void
setStroke(Stroke stroke)
abstract void
setTransform(AffineTransform Tx)
abstract void
shear(double shearX, double shearY)
abstract void
transform(AffineTransform Tx)
abstract void
translate(double tx, double ty)
abstract void
translate(int x, int y)
Translates this context so that its new origin point is the point (x, y).

Methods inherited from class java.awt.Graphics

clearRect, clipRect, copyArea, create, create, dispose, draw3DRect, drawArc, drawBytes, drawChars, drawImage, drawImage, drawImage, drawImage, drawImage, drawImage, drawLine, drawOval, drawPolygon, drawPolygon, drawPolyline, drawRect, drawRoundRect, drawString, drawString, fill3DRect, fillArc, fillOval, fillPolygon, fillPolygon, fillRect, fillRoundRect, finalize, getClip, getClipBounds, getClipBounds, getClipRect, getColor, getFont, getFontMetrics, getFontMetrics, hitClip, setClip, setClip, setColor, setFont, setPaintMode, setXORMode, toString, translate

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Details

Graphics2D

protected Graphics2D()
Default constructor for subclasses.

Method Details

addRenderingHints

public abstract void addRenderingHints(Map hints)

clip

public abstract void clip(Shape s)

draw

public abstract void draw(Shape shape)

draw3DRect

public void draw3DRect(int x,
                       int y,
                       int width,
                       int height,
                       boolean raised)
Overrides:
draw3DRect in interface Graphics

drawGlyphVector

public abstract void drawGlyphVector(GlyphVector g,
                                     float x,
                                     float y)

drawImage

public abstract boolean drawImage(Image image,
                                  AffineTransform xform,
                                  ImageObserver obs)

drawImage

public abstract void drawImage(BufferedImage image,
                               BufferedImageOp op,
                               int x,
                               int y)

drawRenderableImage

public abstract void drawRenderableImage(RenderableImage image,
                                         AffineTransform xform)

drawRenderedImage

public abstract void drawRenderedImage(RenderedImage image,
                                       AffineTransform xform)

drawString

public abstract void drawString(String text,
                                float x,
                                float y)

drawString

public abstract void drawString(String text,
                                int x,
                                int y)
Draws the specified string starting at the specified point.
Overrides:
drawString in interface Graphics
Parameters:
x - The X coordinate of the point to draw at.
y - The Y coordinate of the point to draw at.

drawString

public abstract void drawString(AttributedCharacterIterator iterator,
                                float x,
                                float y)

drawString

public abstract void drawString(AttributedCharacterIterator iterator,
                                int x,
                                int y)
Overrides:
drawString in interface Graphics

fill

public abstract void fill(Shape shape)

fill3DRect

public void fill3DRect(int x,
                       int y,
                       int width,
                       int height,
                       boolean raised)
Fills the specified rectangle with a 3D effect
Overrides:
fill3DRect in interface Graphics
Parameters:
x - The X coordinate of the upper left corner of the fill rect.
y - The Y coordinate of the upper left corner of the fill rect.
width - The width of the fill rect.
height - The height of the fill rect.
raised - true if the rectangle appears raised, false if it should appear etched.

getBackground

public abstract Color getBackground()

getComposite

public abstract Composite getComposite()

getDeviceConfiguration

public abstract GraphicsConfiguration getDeviceConfiguration()

getFontRenderContext

public abstract FontRenderContext getFontRenderContext()

getPaint

public abstract Paint getPaint()

getRenderingHint

public abstract Object getRenderingHint(RenderingHints.Key hintKey)

getRenderingHints

public abstract RenderingHints getRenderingHints()

getStroke

public abstract Stroke getStroke()

getTransform

public abstract AffineTransform getTransform()

hit

public abstract boolean hit(Rectangle rect,
                            Shape text,
                            boolean onStroke)

rotate

public abstract void rotate(double theta)

rotate

public abstract void rotate(double theta,
                            double x,
                            double y)

scale

public abstract void scale(double scaleX,
                           double scaleY)

setBackground

public abstract void setBackground(Color color)

setComposite

public abstract void setComposite(Composite comp)

setPaint

public abstract void setPaint(Paint paint)

setRenderingHint

public abstract void setRenderingHint(RenderingHints.Key hintKey,
                                      Object hintValue)

setRenderingHints

public abstract void setRenderingHints(Map hints)

setStroke

public abstract void setStroke(Stroke stroke)

setTransform

public abstract void setTransform(AffineTransform Tx)

shear

public abstract void shear(double shearX,
                           double shearY)

transform

public abstract void transform(AffineTransform Tx)

translate

public abstract void translate(double tx,
                               double ty)

translate

public abstract void translate(int x,
                               int y)
Translates this context so that its new origin point is the point (x, y).
Overrides:
translate in interface Graphics
Parameters:
x - The new X coordinate of the origin.
y - The new Y coordinate of the origin.

Copyright (C) 2000, 2002, 2004 Free Software Foundation This file is part of GNU Classpath. GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Classpath; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination. As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.