Daily bump.
[official-gcc.git] / libjava / gnu / awt / j2d / DirectRasterGraphics.java
blobd7248b9d84687a4098ba3d14d8ae68f70aa2bd68
1 /* Copyright (C) 2000, 2003 Free Software Foundation
3 This file is part of libgcj.
5 This software is copyrighted work licensed under the terms of the
6 Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
7 details. */
9 package gnu.awt.j2d;
11 import java.awt.Color;
12 import java.awt.Image;
13 import java.awt.Shape;
14 import java.awt.Rectangle;
15 import java.awt.Graphics;
16 import java.awt.Graphics2D;
17 import java.awt.GraphicsConfiguration;
18 import java.awt.Font;
19 import java.awt.FontMetrics;
20 import java.awt.image.Raster;
21 import java.awt.image.ImageObserver;
23 /**
24 * Interface for a simple pixel based backend graphics object that
25 * does not handle translation/transforms, curves, nor advanced
26 * compositing.
28 public interface DirectRasterGraphics extends Cloneable
30 void dispose();
32 void setColor(Color color);
34 void setPaintMode();
36 void setXORMode(Color altColor);
38 void setFont(Font font);
40 FontMetrics getFontMetrics(Font font);
42 // supports rects, multi-rects and polygons
43 void setClip(Shape clip);
45 void copyArea(int x, int y, int width, int height,
46 int dx, int dy);
48 void drawLine(int x1, int y1, int x2, int y2);
50 void drawRect(int x, int y, int width, int height);
52 void fillRect(int x, int y, int width, int height);
54 void drawArc(int x, int y, int width, int height,
55 int startAngle, int arcAngle);
57 void fillArc(int x, int y, int width, int height,
58 int startAngle, int arcAngle);
60 void drawPolyline(int[] xPoints, int[] yPoints, int nPoints);
62 void drawPolygon(int[] xPoints, int[] yPoints, int nPoints);
64 void fillPolygon(int[] xPoints, int[] yPoints, int nPoints,
65 int translateX, int translateY);
67 void drawString(String str, int x, int y);
69 boolean drawImage(Image image, int x, int y,
70 ImageObserver observer);
72 /**
73 * Map the data for screen pixels in the requested bounds to a
74 * raster object. This gives read/write access to the screen
75 * pixels, allowing neat alpha and composite tricks.
77 MappedRaster mapRaster(Rectangle bounds);
79 /**
80 * Detach previously mapped pixel data from a raster object.
82 void unmapRaster(MappedRaster mappedRaster);
84 Object clone();