Use B_FILTER_BITMAP_BILINEAR.
This commit is contained in:
parent
dd8d0d1f5a
commit
b1ddb3c032
|
@ -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 );
|
BRect rect(frame.right - h - 2, frame.top + 2, frame.right - 2, frame.top + h );
|
||||||
owner->SetDrawingMode(B_OP_ALPHA);
|
owner->SetDrawingMode(B_OP_ALPHA);
|
||||||
owner->SetBlendingMode(B_PIXEL_ALPHA, B_ALPHA_OVERLAY);
|
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);
|
owner->SetHighColor(highColor);
|
||||||
|
|
|
@ -94,7 +94,8 @@ BitmapMenuItem::DrawContent(void)
|
||||||
if (fBitmap) {
|
if (fBitmap) {
|
||||||
Menu()->PushState();
|
Menu()->PushState();
|
||||||
Menu()->SetDrawingMode(B_OP_ALPHA);
|
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();
|
Menu()->PopState();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,9 +76,10 @@ PictureView::PreferredSize()
|
||||||
void
|
void
|
||||||
PictureView::Draw(BRect frame)
|
PictureView::Draw(BRect frame)
|
||||||
{
|
{
|
||||||
SetDrawingMode(B_OP_ALPHA);
|
if (fBitmap) {
|
||||||
SetBlendingMode(B_PIXEL_ALPHA, B_ALPHA_OVERLAY);
|
SetDrawingMode(B_OP_ALPHA);
|
||||||
|
SetBlendingMode(B_PIXEL_ALPHA, B_ALPHA_OVERLAY);
|
||||||
if (fBitmap)
|
DrawBitmap(fBitmap, fBitmap->Bounds(),
|
||||||
DrawBitmap(fBitmap, BPoint(0, 0));
|
Bounds(), B_FILTER_BITMAP_BILINEAR);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -132,15 +132,15 @@ ToolButton::Draw(BRect updateRect)
|
||||||
SetDrawingMode(B_OP_ALPHA);
|
SetDrawingMode(B_OP_ALPHA);
|
||||||
SetBlendingMode(B_PIXEL_ALPHA, B_ALPHA_OVERLAY);
|
SetBlendingMode(B_PIXEL_ALPHA, B_ALPHA_OVERLAY);
|
||||||
|
|
||||||
BPoint center = _Center(bounds);
|
BRect frame(bounds);
|
||||||
center.x -= kToolbarIconSize / 2;
|
BPoint center = _Center(frame);
|
||||||
center.y -= kToolbarIconSize / 2;
|
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,
|
DrawBitmap(fBitmap, fBitmap->Bounds(), frame, B_FILTER_BITMAP_BILINEAR);
|
||||||
kToolbarIconSize);
|
bounds.top = frame.bottom;
|
||||||
DrawBitmap(bitmap, center);
|
|
||||||
|
|
||||||
bounds.top = center.y + kToolbarIconSize + 2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Draw label
|
// Draw label
|
||||||
|
|
Ŝarĝante…
Reference in New Issue