Flatten and Unflatten the BPicture before showing it. The picture
doesn't show up, that means something is still broken in Flatten() or Unflatten() git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20267 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -103,12 +103,26 @@ PictureView::~PictureView()
|
||||
|
||||
void
|
||||
PictureView::AllAttached()
|
||||
{
|
||||
{
|
||||
BeginPicture(new BPicture);
|
||||
|
||||
DrawStuff(this);
|
||||
|
||||
fPicture = EndPicture();
|
||||
BPicture *picture = EndPicture();
|
||||
|
||||
BMallocIO stream;
|
||||
|
||||
status_t status = picture->Flatten(&stream);
|
||||
if (status != B_OK)
|
||||
printf("Error flattening BPicture: %s\n", strerror(status));
|
||||
if (status == B_OK) {
|
||||
fPicture = new BPicture();
|
||||
status = fPicture->Unflatten(&stream);
|
||||
if (status != B_OK)
|
||||
printf("Error unflattening BPicture: %s\n", strerror(status));
|
||||
}
|
||||
|
||||
delete picture;
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user