Showing the changes to java/pkg/awt/iOffScreenImage.java (1 of 18352 files). Show all
Unified · Split
| @@ -0,0 +1,33 @@ | ||
| 1 | +/* | |
| 2 | + * %W% - %E% | |
| 3 | + * | |
| 4 | + * Adapted from SunSoft's X11OffScreenImage.java 1.2 97/02/23 | |
| 5 | + */ | |
| 6 | + | |
| 7 | +package inferno.awt; | |
| 8 | + | |
| 9 | +import java.awt.Component; | |
| 10 | +import java.awt.Graphics; | |
| 11 | +import sun.awt.DrawingSurface; | |
| 12 | +import sun.awt.DrawingSurfaceInfo; | |
| 13 | + | |
| 14 | +class iOffScreenImage extends iImage implements DrawingSurface { | |
| 15 | + /** | |
| 16 | + * Construct an image for offscreen rendering to be used with a | |
| 17 | + * given Component. | |
| 18 | + */ | |
| 19 | + public iOffScreenImage(Component c, int w, int h) { | |
| 20 | + super(c, w, h); | |
| 21 | + } | |
| 22 | + | |
| 23 | + public Graphics getGraphics() { | |
| 24 | + Graphics g = new iGraphics(this); | |
| 25 | + initGraphics(g); | |
| 26 | + return g; | |
| 27 | + } | |
| 28 | + | |
| 29 | + // implementation of sun.awt.DrawingSurface's getDrawingSurfaceInfo() | |
| 30 | + public DrawingSurfaceInfo getDrawingSurfaceInfo() { | |
| 31 | + return new iDrawingSurfaceInfo(getImageRep()); | |
| 32 | + } | |
| 33 | +} | |