[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cp-patches] FYI: Fixed Swing painting (again)
From: |
Roman Kennke |
Subject: |
Re: [cp-patches] FYI: Fixed Swing painting (again) |
Date: |
Mon, 26 Sep 2005 14:31:57 +0200 |
Am Montag, den 26.09.2005, 12:16 +0200 schrieb Mark Wielaard:
> 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.
Yeah I see. Looking at the code I see that I also did fix that in one of
my followup patches. (Somewhere deeper down I do setClip(originalClip)
or so).
/Roman
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil