Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / March 2006

Tip: Looking for answers? Try searching our database.

graphics.setClip(null)

Thread view: 
Martijn Mulder - 01 Mar 2006 10:21 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?
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



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.