Opened 6 years ago

Last modified 21 months ago

#9064 assigned bug

An invalidated BView does not draw to a BBitmap

Reported by: axeld Owned by: nobody
Priority: high Milestone: R1
Component: Servers/app_server Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

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.

Change History (1)

comment:1 Changed 21 months ago by axeld

Owner: changed from axeld to nobody
Status: newassigned
Note: See TracTickets for help on using tickets.