Use B_FILTER_BITMAP_BILINEAR.

This commit is contained in:
plfiorini 2010-05-10 22:42:54 +00:00
parent dd8d0d1f5a
commit b1ddb3c032
4 changed files with 18 additions and 15 deletions

View File

@ -153,7 +153,8 @@ void RosterItem::DrawItem(BView* owner, BRect frame, bool complete)
BRect rect(frame.right - h - 2, frame.top + 2, frame.right - 2, frame.top + h );
owner->SetDrawingMode(B_OP_ALPHA);
owner->SetBlendingMode(B_PIXEL_ALPHA, B_ALPHA_OVERLAY);
owner->DrawBitmap(fBitmap, rect);
owner->DrawBitmap(fBitmap, fBitmap->Bounds(),
rect, B_FILTER_BITMAP_BILINEAR);
}
owner->SetHighColor(highColor);

View File

@ -94,7 +94,8 @@ BitmapMenuItem::DrawContent(void)
if (fBitmap) {
Menu()->PushState();
Menu()->SetDrawingMode(B_OP_ALPHA);
Menu()->DrawBitmap(fBitmap, fBitmap->Bounds(), drawrect);
Menu()->SetBlendingMode(B_PIXEL_ALPHA, B_ALPHA_OVERLAY);
Menu()->DrawBitmap(fBitmap, fBitmap->Bounds(), drawrect, B_FILTER_BITMAP_BILINEAR);
Menu()->PopState();
}
}

View File

@ -76,9 +76,10 @@ PictureView::PreferredSize()
void
PictureView::Draw(BRect frame)
{
SetDrawingMode(B_OP_ALPHA);
SetBlendingMode(B_PIXEL_ALPHA, B_ALPHA_OVERLAY);
if (fBitmap)
DrawBitmap(fBitmap, BPoint(0, 0));
if (fBitmap) {
SetDrawingMode(B_OP_ALPHA);
SetBlendingMode(B_PIXEL_ALPHA, B_ALPHA_OVERLAY);
DrawBitmap(fBitmap, fBitmap->Bounds(),
Bounds(), B_FILTER_BITMAP_BILINEAR);
}
}

View File

@ -132,15 +132,15 @@ ToolButton::Draw(BRect updateRect)
SetDrawingMode(B_OP_ALPHA);
SetBlendingMode(B_PIXEL_ALPHA, B_ALPHA_OVERLAY);
BPoint center = _Center(bounds);
center.x -= kToolbarIconSize / 2;
center.y -= kToolbarIconSize / 2;
BRect frame(bounds);
BPoint center = _Center(frame);
frame.bottom = frame.top + kToolbarIconSize + 4;
frame.top += 2;
frame.left = center.x - (kToolbarIconSize / 2);
frame.right = center.x + (kToolbarIconSize / 2);
BBitmap* bitmap = RescaleBitmap(fBitmap, kToolbarIconSize,
kToolbarIconSize);
DrawBitmap(bitmap, center);
bounds.top = center.y + kToolbarIconSize + 2;
DrawBitmap(fBitmap, fBitmap->Bounds(), frame, B_FILTER_BITMAP_BILINEAR);
bounds.top = frame.bottom;
}
// Draw label