+2003-12-05 Scott Gilbertson <scottg@mantatest.com>
+
+ * gnu/gcj/xlib/GC.java (updateClip): Added rectangles argument.
+ (clip): Removed field
+ (clipRectangles): New field.
+ (clone): Use new updateClip.
+ (setClipRectangles): Use new updateClip.
+ * gnu/gcj/xlib/natGC.cc (updateClip): Prepare passed rectangles.
+
2003-12-04 Michael Koch <konqueror@gmx.de>
* java/io/FilePermission.java:
(_Jv_BytecodeVerifier): Initialize it.
(~_Jv_BytecodeVerifier): Destroy ref_intersection objects.
-2003-07-24 H. Väisänen <hvaisane@joyx.joensuu.fi>
+2003-07-24 H. Väisänen <hvaisane@joyx.joensuu.fi>
* java/text/SimpleDateFormat.java (format) [YEAR_FIELD]: Zero pad
unless field size is 2.
* java/io/ObjectOutputStream.java
(PutField.put): Doesnt throws anything.
-200303-28 Michael Koch <konqueror@gmx.de>
+2003Â03-28 Michael Koch <konqueror@gmx.de>
* java/io/FileOutputStream.java:
Merged class documentation and authors with classpath.
gcClone.structure = null;
}
gcClone.initStructure(this);
- gcClone.updateClip();
+ gcClone.updateClip(clipRectangles);
return gcClone;
}
catch (CloneNotSupportedException ex)
*/
public void setClipRectangles(Rectangle[] rectangles)
{
- clip = new Clip(rectangles);
- updateClip();
+ clipRectangles = rectangles;
+ updateClip(clipRectangles);
}
public native void drawString(String text, int x, int y);
return target;
}
- private native void updateClip();
+ private native void updateClip(Rectangle[] rectangles);
private Drawable target;
private RawData structure;
- private Clip clip;
+ private Rectangle[] clipRectangles;
}
// no fast fail
}
-void gnu::gcj::xlib::GC::updateClip()
+void gnu::gcj::xlib::GC::updateClip(AWTRectArray* rectangles)
{
- if (clip == 0)
- return;
+ int numRect = JvGetArrayLength(rectangles);
+ XRectVector* xrectvector = new XRectVector(numRect);
+ for (int i=0; i<numRect; i++)
+ {
+ AWTRect* awtrect = elements(rectangles)[i];
+ XRectangle& xrect = (*xrectvector)[i];
+
+ xrect.x = awtrect->x;
+ xrect.y = awtrect->y;
+ xrect.width = awtrect->width;
+ xrect.height = awtrect->height;
+ }
+
Display* display = target->getDisplay();
::Display* dpy = (::Display*) (display->display);
::GC gc = (::GC) structure;
-
- XRectVector* xrectvector = (XRectVector*) (clip->xrects);
- int numRect = xrectvector->size();
-
+
int originX = 0;
int originY = 0;
int ordering = Unsorted;
XSetClipRectangles(dpy, gc, originX, originY,
&(xrectvector->front()), numRect,
ordering);
- // no fast fail
+ delete xrectvector;
}
void gnu::gcj::xlib::GC::copyArea (gnu::gcj::xlib::Drawable * source,