gnu.awt.j2d

Class IntegerGraphicsState

Implemented Interfaces:
Cloneable

public class IntegerGraphicsState
extends AbstractGraphicsState

IntegerGraphicsState is one of several graphics state implementations. This graphics state is used when the graphics object has simple properties, (coordinate translation only, no transform) and the backend supports integer coordinates (pixel based). For primitive paint operations, this object translates the coordinates and forwards the request to the backend. For requests to draw arbitrary shapes and paths, this object translates the requests to primitive drawing operations supported by the backend. IntegerGraphicsState is meant to support the most common state of an graphics object. The degree of functionality is roughly equivalent with the old java.awt.Graphics API.

Nested Class Summary

static interface
IntegerGraphicsState.ScreenCoupledImage
Interface for images which are coupled to a GraphicsConfiguration, as is typically the case for an off-screen buffer used in double-buffering.

Constructor Summary

IntegerGraphicsState(DirectRasterGraphics directGfx)

Method Summary

void
clearRect(int x, int y, int width, int height)
Object
clone()
void
copyArea(int x, int y, int width, int height, int dx, int dy)
void
dispose()
void
draw(Shape shape)
void
drawArc(int x, int y, int width, int height, int startAngle, int arcAngle)
boolean
drawImage(Image image, int x, int y, ImageObserver observer)
void
drawLine(int x1, int y1, int x2, int y2)
void
drawOval(int x, int y, int width, int height)
void
drawPolygon(int[] xPoints, int[] yPoints, int nPoints)
void
drawPolyline(int[] xPoints, int[] yPoints, int nPoints)
void
drawRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
void
drawString(String text, float x, float y)
void
drawString(String text, int x, int y)
void
fill(Shape shape)
void
fillArc(int x, int y, int width, int height, int startAngle, int arcAngle)
void
fillOval(int x, int y, int width, int height)
void
fillPolygon(int[] xPoints, int[] yPoints, int nPoints)
void
fillRect(int x, int y, int width, int height)
void
fillRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
Shape
getClip()
Rectangle
getClipBounds()
FontMetrics
getFontMetrics(Font font)
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
setClip(Shape clip)
void
setColor(Color color)
void
setFont(Font font)
void
setPaintMode()
void
setXORMode(Color altColor)
void
shear(double shearX, double shearY)
void
translate(double tx, double ty)
void
translate(int x, int y)

Methods inherited from class gnu.awt.j2d.AbstractGraphicsState

clearRect, clone, copyArea, dispose, draw, drawArc, drawImage, drawLine, drawOval, drawPolygon, drawPolyline, drawRoundRect, drawString, drawString, fill, fillArc, fillOval, fillPolygon, fillRect, fillRoundRect, getClip, getClipBounds, getFontMetrics, hit, rotate, rotate, scale, setClip, setColor, setFont, setFrontend, setPaintMode, setXORMode, shear, translate, translate

Methods inherited from class java.lang.Object

clone, equals, extends Object> getClass, finalize, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Details

IntegerGraphicsState

public IntegerGraphicsState(DirectRasterGraphics directGfx)

Method Details

clearRect

public void clearRect(int x,
                      int y,
                      int width,
                      int height)
Overrides:
clearRect in interface AbstractGraphicsState

clone

public Object clone()
Overrides:
clone in interface AbstractGraphicsState

copyArea

public void copyArea(int x,
                     int y,
                     int width,
                     int height,
                     int dx,
                     int dy)
Overrides:
copyArea in interface AbstractGraphicsState

dispose

public void dispose()
Overrides:
dispose in interface AbstractGraphicsState

draw

public void draw(Shape shape)
Overrides:
draw in interface AbstractGraphicsState

drawArc

public void drawArc(int x,
                    int y,
                    int width,
                    int height,
                    int startAngle,
                    int arcAngle)
Overrides:
drawArc in interface AbstractGraphicsState

drawImage

public boolean drawImage(Image image,
                         int x,
                         int y,
                         ImageObserver observer)
Overrides:
drawImage in interface AbstractGraphicsState

drawLine

public void drawLine(int x1,
                     int y1,
                     int x2,
                     int y2)
Overrides:
drawLine in interface AbstractGraphicsState

drawOval

public void drawOval(int x,
                     int y,
                     int width,
                     int height)
Overrides:
drawOval in interface AbstractGraphicsState

drawPolygon

public void drawPolygon(int[] xPoints,
                        int[] yPoints,
                        int nPoints)
Overrides:
drawPolygon in interface AbstractGraphicsState

drawPolyline

public void drawPolyline(int[] xPoints,
                         int[] yPoints,
                         int nPoints)
Overrides:
drawPolyline in interface AbstractGraphicsState

drawRoundRect

public void drawRoundRect(int x,
                          int y,
                          int width,
                          int height,
                          int arcWidth,
                          int arcHeight)
Overrides:
drawRoundRect in interface AbstractGraphicsState

drawString

public void drawString(String text,
                       float x,
                       float y)
Overrides:
drawString in interface AbstractGraphicsState

drawString

public void drawString(String text,
                       int x,
                       int y)
Overrides:
drawString in interface AbstractGraphicsState

fill

public void fill(Shape shape)
Overrides:
fill in interface AbstractGraphicsState

fillArc

public void fillArc(int x,
                    int y,
                    int width,
                    int height,
                    int startAngle,
                    int arcAngle)
Overrides:
fillArc in interface AbstractGraphicsState

fillOval

public void fillOval(int x,
                     int y,
                     int width,
                     int height)
Overrides:
fillOval in interface AbstractGraphicsState

fillPolygon

public void fillPolygon(int[] xPoints,
                        int[] yPoints,
                        int nPoints)
Overrides:
fillPolygon in interface AbstractGraphicsState

fillRect

public void fillRect(int x,
                     int y,
                     int width,
                     int height)
Overrides:
fillRect in interface AbstractGraphicsState

fillRoundRect

public void fillRoundRect(int x,
                          int y,
                          int width,
                          int height,
                          int arcWidth,
                          int arcHeight)
Overrides:
fillRoundRect in interface AbstractGraphicsState

getClip

public Shape getClip()
Overrides:
getClip in interface AbstractGraphicsState

getClipBounds

public Rectangle getClipBounds()
Overrides:
getClipBounds in interface AbstractGraphicsState

getFontMetrics

public FontMetrics getFontMetrics(Font font)
Overrides:
getFontMetrics in interface AbstractGraphicsState

hit

public boolean hit(Rectangle rect,
                   Shape text,
                   boolean onStroke)
Overrides:
hit in interface AbstractGraphicsState

rotate

public void rotate(double theta)
Overrides:
rotate in interface AbstractGraphicsState

rotate

public void rotate(double theta,
                   double x,
                   double y)
Overrides:
rotate in interface AbstractGraphicsState

scale

public void scale(double scaleX,
                  double scaleY)
Overrides:
scale in interface AbstractGraphicsState

setClip

public void setClip(Shape clip)
Overrides:
setClip in interface AbstractGraphicsState

setColor

public void setColor(Color color)
Overrides:
setColor in interface AbstractGraphicsState

setFont

public void setFont(Font font)
Overrides:
setFont in interface AbstractGraphicsState

setPaintMode

public void setPaintMode()
Overrides:
setPaintMode in interface AbstractGraphicsState

setXORMode

public void setXORMode(Color altColor)
Overrides:
setXORMode in interface AbstractGraphicsState

shear

public void shear(double shearX,
                  double shearY)
Overrides:
shear in interface AbstractGraphicsState

translate

public void translate(double tx,
                      double ty)
Overrides:
translate in interface AbstractGraphicsState

translate

public void translate(int x,
                      int y)
Overrides:
translate in interface AbstractGraphicsState

Copyright (C) 2000, 2003 Free Software Foundation This file is part of libgcj. This software is copyrighted work licensed under the terms of the Libgcj License. Please consult the file "LIBGCJ_LICENSE" for details.