When I am done clipping the java.awt.Graphics object, is it ok to call
Graphics.setClip(null) to remove all previous clipping areas and restore the
Graphics object to its original state?
Paul Hamaker - 01 Mar 2006 11:15 GMT
docs :getClipBounds()
'..... If no clip has previously been set, or if the clip has been
cleared using setClip(null), ....' would suggest that that's okay.
--------------------
Paul Hamaker, SEMM, teaching ICT since 1987
http://javalessons.com
Paul Hamaker - 01 Mar 2006 11:15 GMT
docs :getClipBounds()
'..... If no clip has previously been set, or if the clip has been
cleared using setClip(null), ....' would suggest that that's okay.
--------------------
Paul Hamaker, SEMM, teaching ICT since 1987
http://javalessons.com
Thomas Weidenfeller - 01 Mar 2006 12:05 GMT
> When I am done clipping the java.awt.Graphics object, is it ok to call
> Graphics.setClip(null) to remove all previous clipping areas and restore the
> Graphics object to its original state?
This assumes that there was previously no clipping set. If there was a
clipping set, then setClip(null) of course doesn't reset the object to
its original state.
/Thomas

Signature
The comp.lang.java.gui FAQ:
ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/computer-lang/java/gui/faq
http://www.uni-giessen.de/faq/archiv/computer-lang.java.gui.faq/
Monique Y. Mudama - 01 Mar 2006 19:02 GMT
> When I am done clipping the java.awt.Graphics object, is it ok to
> call Graphics.setClip(null) to remove all previous clipping areas
> and restore the Graphics object to its original state?
You can always save off the previous clip, then use Graphics.setClip()
to put it back after you're done.

Signature
monique
Ask smart questions, get good answers:
http://www.catb.org/~esr/faqs/smart-questions.html