classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cp-patches] FYI: Fixed Swing painting (again)


From: Mark Wielaard
Subject: Re: [cp-patches] FYI: Fixed Swing painting (again)
Date: Mon, 26 Sep 2005 12:16:36 +0200

Hi Roman,

On Mon, 2005-09-26 at 11:50 +0200, Roman Kennke wrote:
> > >          Rectangle bounds = children[i].getBounds();
> > >          Rectangle oldClip = g.getClipBounds();
> > > +        if (oldClip == null)
> > > +          oldClip = bounds;
> > 
> > And later you do:
> > 
> >             g.setClip(oldClip);
> > 
> > Even when oldClip was originally null.
> 
> This is 100% ok. Handling of Graphics objects should be symetrically:
> 1. If you get a Graphics as parameter and set a clip, then the clip
> should be reset to the orignal state when the method leaves, setting it
> to null should be ok here.

My point was that if g.getClipBounds() returned null it is then not
reset to null, but to oldClip == bounds.

Cheers,

Mark

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]