aboutsummaryrefslogtreecommitdiff
path: root/libjava/gnu/gcj/xlib/GC.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/gnu/gcj/xlib/GC.java')
-rw-r--r--libjava/gnu/gcj/xlib/GC.java31
1 files changed, 22 insertions, 9 deletions
diff --git a/libjava/gnu/gcj/xlib/GC.java b/libjava/gnu/gcj/xlib/GC.java
index 021f53756fb..24cd3bd1f53 100644
--- a/libjava/gnu/gcj/xlib/GC.java
+++ b/libjava/gnu/gcj/xlib/GC.java
@@ -36,15 +36,23 @@ public class GC implements Cloneable
*/
public Object clone()
{
- GC gcClone = target.getGCFromCache ();
- if (gcClone==null)
- {
- gcClone = (GC) super.clone();
- gcClone.structure = null;
- }
- gcClone.initStructure(this);
- gcClone.updateClip();
- return gcClone;
+ try
+ {
+ GC gcClone = target.getGCFromCache ();
+ if (gcClone==null)
+ {
+ gcClone = (GC) super.clone();
+ gcClone.structure = null;
+ }
+ gcClone.initStructure(this);
+ gcClone.updateClip();
+ return gcClone;
+ }
+ catch (CloneNotSupportedException ex)
+ {
+ // This should never happen.
+ throw new InternalError ();
+ }
}
private native void initStructure(GC copyFrom);
@@ -130,6 +138,11 @@ public class GC implements Cloneable
int destX, int destY,
int width, int height);
+ public native void copyArea (Drawable source,
+ int srcX, int srcY,
+ int destX, int destY,
+ int width, int height);
+
public Drawable getDrawable()
{
return target;