mirror of git://gcc.gnu.org/git/gcc.git
GC.java (updateClip): Added rectangles argument.
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. From-SVN: r74348
This commit is contained in:
parent
07a3c905b3
commit
b3e4bb0347
|
|
@ -1,3 +1,12 @@
|
||||||
|
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>
|
2003-12-04 Michael Koch <konqueror@gmx.de>
|
||||||
|
|
||||||
* java/io/FilePermission.java:
|
* java/io/FilePermission.java:
|
||||||
|
|
@ -4145,7 +4154,7 @@
|
||||||
(_Jv_BytecodeVerifier): Initialize it.
|
(_Jv_BytecodeVerifier): Initialize it.
|
||||||
(~_Jv_BytecodeVerifier): Destroy ref_intersection objects.
|
(~_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
|
* java/text/SimpleDateFormat.java (format) [YEAR_FIELD]: Zero pad
|
||||||
unless field size is 2.
|
unless field size is 2.
|
||||||
|
|
@ -7232,7 +7241,7 @@
|
||||||
* java/io/ObjectOutputStream.java
|
* java/io/ObjectOutputStream.java
|
||||||
(PutField.put): Doesnt throws anything.
|
(PutField.put): Doesnt throws anything.
|
||||||
|
|
||||||
200303-28 Michael Koch <konqueror@gmx.de>
|
200303-28 Michael Koch <konqueror@gmx.de>
|
||||||
|
|
||||||
* java/io/FileOutputStream.java:
|
* java/io/FileOutputStream.java:
|
||||||
Merged class documentation and authors with classpath.
|
Merged class documentation and authors with classpath.
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ public class GC implements Cloneable
|
||||||
gcClone.structure = null;
|
gcClone.structure = null;
|
||||||
}
|
}
|
||||||
gcClone.initStructure(this);
|
gcClone.initStructure(this);
|
||||||
gcClone.updateClip();
|
gcClone.updateClip(clipRectangles);
|
||||||
return gcClone;
|
return gcClone;
|
||||||
}
|
}
|
||||||
catch (CloneNotSupportedException ex)
|
catch (CloneNotSupportedException ex)
|
||||||
|
|
@ -107,8 +107,8 @@ public class GC implements Cloneable
|
||||||
*/
|
*/
|
||||||
public void setClipRectangles(Rectangle[] rectangles)
|
public void setClipRectangles(Rectangle[] rectangles)
|
||||||
{
|
{
|
||||||
clip = new Clip(rectangles);
|
clipRectangles = rectangles;
|
||||||
updateClip();
|
updateClip(clipRectangles);
|
||||||
}
|
}
|
||||||
|
|
||||||
public native void drawString(String text, int x, int y);
|
public native void drawString(String text, int x, int y);
|
||||||
|
|
@ -148,10 +148,10 @@ public class GC implements Cloneable
|
||||||
return target;
|
return target;
|
||||||
}
|
}
|
||||||
|
|
||||||
private native void updateClip();
|
private native void updateClip(Rectangle[] rectangles);
|
||||||
|
|
||||||
private Drawable target;
|
private Drawable target;
|
||||||
private RawData structure;
|
private RawData structure;
|
||||||
private Clip clip;
|
private Rectangle[] clipRectangles;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -217,25 +217,33 @@ void gnu::gcj::xlib::GC::putImage(XImage* image,
|
||||||
// no fast fail
|
// no fast fail
|
||||||
}
|
}
|
||||||
|
|
||||||
void gnu::gcj::xlib::GC::updateClip()
|
void gnu::gcj::xlib::GC::updateClip(AWTRectArray* rectangles)
|
||||||
{
|
{
|
||||||
if (clip == 0)
|
int numRect = JvGetArrayLength(rectangles);
|
||||||
return;
|
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* display = target->getDisplay();
|
||||||
::Display* dpy = (::Display*) (display->display);
|
::Display* dpy = (::Display*) (display->display);
|
||||||
::GC gc = (::GC) structure;
|
::GC gc = (::GC) structure;
|
||||||
|
|
||||||
XRectVector* xrectvector = (XRectVector*) (clip->xrects);
|
|
||||||
int numRect = xrectvector->size();
|
|
||||||
|
|
||||||
int originX = 0;
|
int originX = 0;
|
||||||
int originY = 0;
|
int originY = 0;
|
||||||
int ordering = Unsorted;
|
int ordering = Unsorted;
|
||||||
XSetClipRectangles(dpy, gc, originX, originY,
|
XSetClipRectangles(dpy, gc, originX, originY,
|
||||||
&(xrectvector->front()), numRect,
|
&(xrectvector->front()), numRect,
|
||||||
ordering);
|
ordering);
|
||||||
// no fast fail
|
delete xrectvector;
|
||||||
}
|
}
|
||||||
|
|
||||||
void gnu::gcj::xlib::GC::copyArea (gnu::gcj::xlib::Drawable * source,
|
void gnu::gcj::xlib::GC::copyArea (gnu::gcj::xlib::Drawable * source,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue