[haiku-commits] Re: r36470 - haiku/trunk/src/kits/interface

  • From: Stephan Assmus <superstippi@xxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 25 Apr 2010 17:39:06 +0200

On 2010-04-25 at 16:46:54 [+0200], Jérôme Duval <korli@xxxxxxxxxxxxxxxx> 
wrote:
> 2010/4/25  <superstippi@xxxxxx>:
> > +       // Make sure that the dirty area outside the text is redrawn too.
> > +       BRegion invalid(oldTextRect | fTextRect);
> > +       invalid.Exclude(fTextRect);
> 
> Is the resulting invalid region the same with the following ?
> 
> BRegion invalid(oldTextRect);
> invalid.Exclude(fTextRect);

Actually no. Here's an illustration. O = old, X = new:

Layout of O versus X:

OOOOOOOOOOOOOOO
OXXXXXXXXXXXXXXX
OXXXXXXXXXXXXXXX
OXXXXXXXXXXXXXXX
OXXXXXXXXXXXXXXX
 XXXXXXXXXXXXXXX
 XXXXXXXXXXXXXXX

O | X:

OOOOOOOOOOOOOOO+
OXXXXXXXXXXXXXXX
OXXXXXXXXXXXXXXX
OXXXXXXXXXXXXXXX
OXXXXXXXXXXXXXXX
+XXXXXXXXXXXXXXX
+XXXXXXXXXXXXXXX

Region:

OOOOOOOOOOOOOOO+
O
O
O
O
+
+

In your proposal, only the Os would be left above, not the +s. For the case 
at hand, it may still be the desired result, though, but I am not sure.

Best regards,
-Stephan

Other related posts: