[4160] in java-interest
Re: clipRect() bug? - Help!
daemon@ATHENA.MIT.EDU (Dave Lennert)
Tue Dec 12 15:22:15 1995
To: shrike@batnet.com (The Shrike)
cc: java-interest@java.sun.com
In-reply-to: Your message of "Sat, 09 Dec 95 22:52:26 PST."
<9512100652.AA05116@batnet.com>
Date: Tue, 12 Dec 95 09:54:42 PST
From: Dave Lennert <davel@ibeam.jf.intel.com>
Sorry, I forgot to say. Windows95 beta JDK. Displaying via appletviewer.
> What system are you using? Some flavor of Windows I imagine.
>
> s.
>
> In article <m0tOECN-000iCfC@9053-news.ishark.jf.intel.com>,
> davel@ibeam.jf.intel.com (Dave Lennert) wrote:
>
> ] During a single update() (screen painting) I want to establish different
> ] clipping rectangles for the different objects I'm rendering on the screen.
> ]
> ] The Graphics class has getClipRect() to retrieve the current setting.
> ] It has clipRect() to set the clipping rectangle to the *intersection*
> ] of the current setting and a new rectangle. But it apparently has no
> ] method to restore (enlarge) the clipping rectangle.
> ]
> ] It does have the create() method which supposedly creates a copy of the
> ] Graphics object that one can call clipRect() against without affecting
> ] the original Graphics object. This appears to work EXCEPT IN THE
> ] FOLLOWING CASE.
> ]
> ] When the Graphics object is an offscreen Image (for double buffering)
> ] from Component.createImage(w,h).getGraphics(), the new Graphics object
> ] returned from create() apparently shares it's clipping rectangle
> ] settings with the original Image Graphics object. That is, a
> ] clipRect() on the new Graphics objects affects the old Graphics object
> ] as well.
> ]
> ] Since this works against a regular Graphics object, this sounds like a
> ] bug. At any rate, is there a way to somehow enlarge the clipping rect
> ] once you've reduced it?
> ] -
> ] This message was sent to the java-interest mailing list
> ] Info: send 'help' to java-interest-request@java.sun.com
-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com