[2722] in java-interest
JDK clipping bug(s)
daemon@ATHENA.MIT.EDU (julie melbin)
Wed Oct 11 22:06:29 1995
Date: Wed, 11 Oct 95 20:02:02 EDT
To: java-interest@java.sun.com
From: julie melbin <julie@world.std.com>
Dear Javaites,
Please note the following which is both in the .html API file for Graphics
and in the java/awt/Graphics.java source file.
/**
* Clips to a rectangle. The resulting clipping area is the
* intersection of the current clipping area and the specified
* rectangle. Graphic operations have no effect outside of the
* clipping area.
* @param x the x coordinate
* @param y the y coordinate
* @param width the width of the rectangle
* @param height the height of the rectangle
* @see #getClipRect
*/
public abstract void clipRect(int x, int y, int width, int height);
Note that I also can't seem to find the Alpha3 method clearClip() anywhere
in the API for the Graphics object in the JDK documentation... so...my
question for the JAVA experts out there is:
"How does one expand (make larger)the current clipping rectangle
within a paint or update method?"
In my paint() for my Applet, I set clipping to some rect to render a clipped
object within the exposed area, ie clipRect(10, 10, 30, 30). Draw something,
then try to set clip to say like clipRect(50, 50, 30, 30). What happens
since there is no longer a clearClip() between the 2 clipRect() calls is
that nothing draws after the second clipRect() call.
Can someone tell me the correct way to do what I want to do? Or what I
should really be doing, if that's the case
Thanks much
julie
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com