Some groundwork for overlay support. If someone wants to finish this, feel

free to continue (it would be nice to be notified before, though, in case
I get to it again in the next weeks).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16561 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2006-03-01 21:20:57 +00:00
parent 5891e232e2
commit f19839c230
10 changed files with 104 additions and 40 deletions
+13 -19
View File
@@ -3085,15 +3085,17 @@ status_t
BView::SetViewOverlay(const BBitmap *overlay, BRect srcRect, BRect dstRect,
rgb_color *colorKey, uint32 followFlags, uint32 options)
{
status_t err = _SetViewBitmap(overlay, srcRect, dstRect, followFlags,
options | 0x4);
if ((overlay->fFlags & B_BITMAP_WILL_OVERLAY) == 0)
return B_BAD_VALUE;
// TODO: Incomplete?
status_t status = _SetViewBitmap(overlay, srcRect, dstRect, followFlags,
options | AS_REQUEST_COLOR_KEY);
if (status == B_OK) {
// read the color that will be treated as transparent
fOwner->fLink->Read<rgb_color>(colorKey);
}
// read the color that will be treated as transparent
fOwner->fLink->Read<rgb_color>(colorKey);
return err;
return status;
}
@@ -3102,20 +3104,12 @@ BView::SetViewOverlay(const BBitmap *overlay, rgb_color *colorKey,
uint32 followFlags, uint32 options)
{
BRect rect;
if (overlay)
if (overlay != NULL) {
rect = overlay->Bounds();
rect.OffsetTo(B_ORIGIN);
}
rect.OffsetTo(0, 0);
status_t err = _SetViewBitmap(overlay, rect, rect, followFlags,
options | 0x4);
// TODO: Incomplete?
// read the color that will be treated as transparent
fOwner->fLink->Read<rgb_color>(colorKey);
return err;
return SetViewOverlay(overlay, rect, rect, colorKey, followFlags, options);
}