graphics.setClip(null)

M

Martijn Mulder

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?
 
P

Paul Hamaker

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.
 
P

Paul Hamaker

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.
 
T

Thomas Weidenfeller

Martijn said:
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
 
M

Monique Y. Mudama

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top