[haiku-bugs] [Haiku] #9064: An invalidated BView does not draw to a BBitmap

  • From: "Haiku" <trac@xxxxxxxxxxxx>
  • Date: Sat, 13 Oct 2012 18:49:02 -0000

#9064: An invalidated BView does not draw to a BBitmap
--------------------------------+------------------------------
 Reporter:  axeld               |        Owner:  axeld
     Type:  bug                 |       Status:  new
 Priority:  high                |    Milestone:  R1
Component:  Servers/app_server  |      Version:  R1/Development
 Keywords:                      |   Blocked By:
 Blocking:                      |  Has a Patch:  0
 Platform:  All                 |
--------------------------------+------------------------------
 When you have the following construct, nothing will ever be drawn to  the
 bitmap:
 {{{
         BBitmap* bitmap = new BBitmap(frame, B_RGBA32, true);
         BView* view = new BView(bitmap->Bounds(), NULL, 0, B_WILL_DRAW);
         bitmap->AddChild(view);

         if (view->LockLooper()) {
                 view->Invalidate();
                 view->SetHighColor(225, 225, 225, 128);
                 view->FillRect(view->Bounds());

                 view->UnlockLooper();
         }
 }}}
 If you remove the Invalidate(), the drawing operation is performed as
 expected. Needless to say, the code above worked fine under BeOS.

-- 
Ticket URL: <http://dev.haiku-os.org/ticket/9064>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: