Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > graphics.setClip(null)

Reply
Thread Tools

graphics.setClip(null)

 
 
Martijn Mulder
Guest
Posts: n/a
 
      03-01-2006
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?


 
Reply With Quote
 
 
 
 
Paul Hamaker
Guest
Posts: n/a
 
      03-01-2006
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

 
Reply With Quote
 
 
 
 
Paul Hamaker
Guest
Posts: n/a
 
      03-01-2006
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

 
Reply With Quote
 
Thomas Weidenfeller
Guest
Posts: n/a
 
      03-01-2006
Martijn Mulder wrote:
> 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
--
The comp.lang.java.gui FAQ:
ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/...g/java/gui/faq
http://www.uni-giessen.de/faq/archiv....java.gui.faq/
 
Reply With Quote
 
Monique Y. Mudama
Guest
Posts: n/a
 
      03-01-2006
On 2006-03-01, Martijn Mulder penned:
> 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.

--
monique

Ask smart questions, get good answers:
http://www.catb.org/~esr/faqs/smart-questions.html
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Advertisments