diff options
author | Scott Gilbertson <scottg@mantatest.com> | 2006-02-23 20:50:49 +0000 |
---|---|---|
committer | Scott Gilbertson <sgilbertson@gcc.gnu.org> | 2006-02-23 20:50:49 +0000 |
commit | cbb5e20166ec05d529f819e12e0727ca6ff1749a (patch) | |
tree | e7dbeee69e81b207b0965b99b096bca140842b68 /libjava/gnu/awt/j2d/IntegerGraphicsState.java | |
parent | 072b06f2dce99ea6fe42d7ec20ab152019c5f40b (diff) | |
download | gcc-cbb5e20166ec05d529f819e12e0727ca6ff1749a.zip gcc-cbb5e20166ec05d529f819e12e0727ca6ff1749a.tar.gz gcc-cbb5e20166ec05d529f819e12e0727ca6ff1749a.tar.bz2 |
IntegerGraphicsState.java (getClip): Clone clip before returning, handle null clip.
2006-02-23 Scott Gilbertson <scottg@mantatest.com>
* gnu/awt/j2d/IntegerGraphicsState.java (getClip): Clone clip
before returning, handle null clip.
(getClipBounds): Handle null clip.
* gnu/awt/j2d/Graphics2DImpl.java (clipRect): Handle null clip.
* gnu/awt/xlib/XCanvasPeer.java ():
(getLocationOnScreen): Implement.
* classpath/gnu/java/awt/peer/GLightweightPeer.java
(repaint): Merged with Classpath.
* classpath/java/awt/Graphics.java (hitClip): Merged with
Classpath.
From-SVN: r111395
Diffstat (limited to 'libjava/gnu/awt/j2d/IntegerGraphicsState.java')
-rw-r--r-- | libjava/gnu/awt/j2d/IntegerGraphicsState.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libjava/gnu/awt/j2d/IntegerGraphicsState.java b/libjava/gnu/awt/j2d/IntegerGraphicsState.java index 4eb4c61..bcfacd0 100644 --- a/libjava/gnu/awt/j2d/IntegerGraphicsState.java +++ b/libjava/gnu/awt/j2d/IntegerGraphicsState.java @@ -132,9 +132,11 @@ public class IntegerGraphicsState extends AbstractGraphicsState public Shape getClip() { + if (clip == null) + return null; if (clip instanceof Rectangle) { - Rectangle clipRect = (Rectangle) clip; + Rectangle clipRect = (Rectangle) ((Rectangle) clip).clone(); clipRect.x -= tx; clipRect.y -= ty; return clipRect; @@ -149,6 +151,8 @@ public class IntegerGraphicsState extends AbstractGraphicsState public Rectangle getClipBounds() { + if (clip == null) + return null; Rectangle clipRect = clip.getBounds(); clipRect.x -= tx; |