* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@111395
138bc75d-0d04-0410-961f-
82ee72b054a4
+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.
+
2006-02-21 Robert Schuster <robertschuster@fsfe.org>
* link.cc: Added variant of create_error_method that
2006-02-21 Robert Schuster <robertschuster@fsfe.org>
* link.cc: Added variant of create_error_method that
public void print(Graphics graphics) {}
public void print(Graphics graphics) {}
- public void repaint(long tm, int x, int y, int width, int height) {}
+ public void repaint(long tm, int x, int y, int width, int height)
+ {
+ Component p = comp.getParent ();
+ if(p != null)
+ p.repaint(tm,x+comp.getX(),y+comp.getY(),width,height);
+ }
public void requestFocus() {}
public void requestFocus() {}
*/
public boolean hitClip(int x, int y, int width, int height)
{
*/
public boolean hitClip(int x, int y, int width, int height)
{
+ Shape clip = getClip();
+ if (clip == null)
+ return true;
return getClip().intersects(x, y, width, height);
}
return getClip().intersects(x, y, width, height);
}
public void clipRect(int x, int y, int width, int height)
{
Shape clip = state.getClip();
public void clipRect(int x, int y, int width, int height)
{
Shape clip = state.getClip();
+ if (clip == null)
+ {
+ clip = new Rectangle (x,y,width,height);
+ setClip (clip);
+ return;
+ }
if (clip instanceof Rectangle)
{
Rectangle clipRect = (Rectangle) clip;
if (clip instanceof Rectangle)
{
Rectangle clipRect = (Rectangle) clip;
+ if (clip == null)
+ return null;
if (clip instanceof Rectangle)
{
if (clip instanceof Rectangle)
{
- Rectangle clipRect = (Rectangle) clip;
+ Rectangle clipRect = (Rectangle) ((Rectangle) clip).clone();
clipRect.x -= tx;
clipRect.y -= ty;
return clipRect;
clipRect.x -= tx;
clipRect.y -= ty;
return clipRect;
public Rectangle getClipBounds()
{
public Rectangle getClipBounds()
{
+ if (clip == null)
+ return null;
Rectangle clipRect = clip.getBounds();
clipRect.x -= tx;
Rectangle clipRect = clip.getBounds();
clipRect.x -= tx;
gfx2d.setColor(component.getBackground());
return gfx2d;
}
gfx2d.setColor(component.getBackground());
return gfx2d;
}
+
+ private Rectangle locationBounds;
public Point getLocationOnScreen()
{
public Point getLocationOnScreen()
{
- throw new UnsupportedOperationException("FIXME, not implemented");
+ locationBounds = window.getBounds (locationBounds);
+ return new Point (locationBounds.x,locationBounds.y);
}
public Dimension getMinimumSize ()
}
public Dimension getMinimumSize ()