diff options
| author | Mario Torre <neugens@limasoftware.net> | 2008-05-29 16:41:39 +0000 |
|---|---|---|
| committer | Mario Torre <neugens@limasoftware.net> | 2008-05-29 16:41:39 +0000 |
| commit | c191297d1febe4e68c77215726c451c095d9c954 (patch) | |
| tree | e8c9585dd1ab0ad6353c50e9d4a7f08f7075fa5b /gnu/java/awt/peer/x/GLGraphics.java | |
| parent | 1a8cbdd821fd0bcd92cd104abc091ababd777973 (diff) | |
| download | classpath-c191297d1febe4e68c77215726c451c095d9c954.tar.gz | |
2008-05-29 Mario Torre <neugens@aicas.com>
* gnu/java/awt/java2d/AbstractGraphics2D.java (setColor): now set directly
the foreground color the application wants to use to draw. On null, behave
like OpenJDK, drawing black.
(renderScanline): fixed NPE, paintContext never initialized. Correctely
retrieve destination raster
(getColor): Return the correct type.
(static initializer): HashMap now typed.
(background): now defaults to black and not null.
(getPaintContext): new method. Initialize lazily the PaintContext.
(foreground): new field.
(isForegroundColorNull): likewise.
(getDeviceBounds): made abstract.
* gnu/java/awt/java2d/RasterGraphics.java (getDeviceBounds): new method.
* gnu/java/awt/java2d/ScanlineConverter.java (renderShape): pass correct
value of Y to doScanline.
* gnu/java/awt/peer/x/GLGraphics.java (getDeviceBounds): new method.
(setBackground): synch with new Escher 2.0 API.
* gnu/java/awt/peer/x/XGraphicsConfiguration.java (getDefaultTransform):
implemented.
(getBounds): new method.
* java/awt/AlphaComposite.java (derive(int) and derive(float)):
new methods.
* java/awt/image/WritableRaster.java (createWritableTranslatedChild):
now call createWritableChild.
(createWritableChild): reformatted.
Diffstat (limited to 'gnu/java/awt/peer/x/GLGraphics.java')
| -rw-r--r-- | gnu/java/awt/peer/x/GLGraphics.java | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/gnu/java/awt/peer/x/GLGraphics.java b/gnu/java/awt/peer/x/GLGraphics.java index c80c85c28..8fae5ee7e 100644 --- a/gnu/java/awt/peer/x/GLGraphics.java +++ b/gnu/java/awt/peer/x/GLGraphics.java @@ -39,7 +39,9 @@ package gnu.java.awt.peer.x; import java.awt.Color; import java.awt.GraphicsConfiguration; +import java.awt.Rectangle; import java.awt.image.ColorModel; +import java.util.Map; import gnu.java.awt.java2d.AbstractGraphics2D; import gnu.x11.extension.glx.GL; @@ -70,7 +72,7 @@ public class GLGraphics extends AbstractGraphics2D public void setBackground(Color b) { super.setBackground(b); - gl.clear_color(b.getRed() / 255.F, b.getGreen() / 255.F, + gl.clearColor(b.getRed() / 255.F, b.getGreen() / 255.F, b.getBlue() / 255.F, b.getAlpha() / 255.F); } @@ -120,4 +122,12 @@ public class GLGraphics extends AbstractGraphics2D throw new UnsupportedOperationException("Not yet implemented"); } + @Override + protected Rectangle getDeviceBounds() + { + // FIXME: not sure it's correct + return new Rectangle(0, 0, + gl.display.default_screen.width, + gl.display.default_screen.height); + } } |
