[haiku-commits] Re: haiku: hrev44039 - src/kits/interface headers/os/interface src/preferences/keymap

  • From: "Adrien Destugues" <pulkomandy@xxxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 19 Apr 2012 20:05:39 +0200

Le Thu, 19 Apr 2012 19:51:35 +0200, John Scipione <jscipione@xxxxxxxxx> a écrit:


On Thu, Apr 19, 2012 at 1:11 PM, Adrien Destugues
<pulkomandy@xxxxxxxxxxxxx> wrote:
To avoid the tearing and flickering, the solution is to draw to a BBitmap,
then copy the finished result to the actual BView.
The tearing happens because you are drawing a complex object with several
layers, and you can see the drawing as it goes. Using fillroundrect will
make things even worse, because it draws over the whole button.

Using FillRoundRect() certainly does make things worse. In the Deskcalc
CalcView::Draw() method could I create a new view with the right frame
dimensions, use ControlLook to draw the button on that view and then draw the result over CalcView without adding the new view as a child view of CalcView?


Add your drawing view to a BBitmap (using BBitmap->AddChild()), then draw that bitmap to the actual view.

--
Adrien.

Other related posts: