java.awt

Class Graphics2D


public abstract class Graphics2D
extends Graphics

Constructor Summary

Graphics2D()
Default constructor for subclasses.

Method Summary

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


clip

public void clip(Shape s)


draw

public 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 void drawGlyphVector(GlyphVector g,
                            float x,
                            float y)


drawImage

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


drawImage

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


drawRenderableImage

public void drawRenderableImage(RenderableImage image,
                                AffineTransform xform)


drawRenderedImage

public void drawRenderedImage(RenderedImage image,
                              AffineTransform xform)


drawString

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


drawString

public 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 void drawString(AttributedCharacterIterator iterator,
                       float x,
                       float y)


drawString

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


fill

public 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 Color getBackground()


getComposite

public Composite getComposite()


getDeviceConfiguration

public GraphicsConfiguration getDeviceConfiguration()


getFontRenderContext

public FontRenderContext getFontRenderContext()


getPaint

public Paint getPaint()


getRenderingHint

public Object getRenderingHint(RenderingHints.Key hintKey)


getRenderingHints

public RenderingHints getRenderingHints()


getStroke

public Stroke getStroke()


getTransform

public AffineTransform getTransform()


hit

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


rotate

public void rotate(double theta)


rotate

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


scale

public void scale(double scaleX,
                  double scaleY)


setBackground

public void setBackground(Color color)


setComposite

public void setComposite(Composite comp)


setPaint

public void setPaint(Paint paint)


setRenderingHint

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


setRenderingHints

public void setRenderingHints(Map hints)


setStroke

public void setStroke(Stroke stroke)


setTransform

public void setTransform(AffineTransform Tx)


shear

public void shear(double shearX,
                  double shearY)


transform

public void transform(AffineTransform Tx)


translate

public void translate(double tx,
                      double ty)


translate

public 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.