@@ -197,7 +197,7 @@ BackgroundImage::Show(BackgroundImageInfo* info, BView* view)
|
|||||||
BRect bitmapBounds(info->fBitmap->Bounds());
|
BRect bitmapBounds(info->fBitmap->Bounds());
|
||||||
BRect destinationBitmapBounds(bitmapBounds);
|
BRect destinationBitmapBounds(bitmapBounds);
|
||||||
|
|
||||||
uint32 tile = 0;
|
uint32 options = 0;
|
||||||
uint32 followFlags = B_FOLLOW_TOP | B_FOLLOW_LEFT;
|
uint32 followFlags = B_FOLLOW_TOP | B_FOLLOW_LEFT;
|
||||||
|
|
||||||
// figure out the display mode and the destination bounds for the bitmap
|
// figure out the display mode and the destination bounds for the bitmap
|
||||||
@@ -225,6 +225,7 @@ BackgroundImage::Show(BackgroundImageInfo* info, BView* view)
|
|||||||
viewBounds.Width(), viewBounds.Height() + overlap);
|
viewBounds.Width(), viewBounds.Height() + overlap);
|
||||||
}
|
}
|
||||||
followFlags = B_FOLLOW_ALL;
|
followFlags = B_FOLLOW_ALL;
|
||||||
|
options |= B_FILTER_BITMAP_BILINEAR;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// else fall thru
|
// else fall thru
|
||||||
@@ -237,13 +238,13 @@ BackgroundImage::Show(BackgroundImageInfo* info, BView* view)
|
|||||||
(viewBounds.Width() - bitmapBounds.Width()) / 2,
|
(viewBounds.Width() - bitmapBounds.Width()) / 2,
|
||||||
(viewBounds.Height() - bitmapBounds.Height()) / 2);
|
(viewBounds.Height() - bitmapBounds.Height()) / 2);
|
||||||
}
|
}
|
||||||
tile = B_TILE_BITMAP;
|
options |= B_TILE_BITMAP;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// switch to the bitmap and force a redraw
|
// switch to the bitmap and force a redraw
|
||||||
view->SetViewBitmap(info->fBitmap, bitmapBounds, destinationBitmapBounds,
|
view->SetViewBitmap(info->fBitmap, bitmapBounds, destinationBitmapBounds,
|
||||||
followFlags, tile);
|
followFlags, options);
|
||||||
view->Invalidate();
|
view->Invalidate();
|
||||||
fShowingBitmap = info;
|
fShowingBitmap = info;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -283,7 +283,7 @@ BackgroundImage::Show(BackgroundImageInfo* info, BView* view)
|
|||||||
offset.x *= x_ratio;
|
offset.x *= x_ratio;
|
||||||
offset.y *= y_ratio;
|
offset.y *= y_ratio;
|
||||||
|
|
||||||
uint32 tile = 0;
|
uint32 options = 0;
|
||||||
uint32 followFlags = B_FOLLOW_TOP | B_FOLLOW_LEFT;
|
uint32 followFlags = B_FOLLOW_TOP | B_FOLLOW_LEFT;
|
||||||
|
|
||||||
// figure out the display mode and the destination bounds for the bitmap
|
// figure out the display mode and the destination bounds for the bitmap
|
||||||
@@ -312,6 +312,7 @@ BackgroundImage::Show(BackgroundImageInfo* info, BView* view)
|
|||||||
viewBounds.Width(), viewBounds.Height() + overlap);
|
viewBounds.Width(), viewBounds.Height() + overlap);
|
||||||
}
|
}
|
||||||
followFlags = B_FOLLOW_ALL;
|
followFlags = B_FOLLOW_ALL;
|
||||||
|
options |= B_FILTER_BITMAP_BILINEAR;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// else fall thru
|
// else fall thru
|
||||||
@@ -328,13 +329,13 @@ BackgroundImage::Show(BackgroundImageInfo* info, BView* view)
|
|||||||
(viewBounds.Width() - destinationBitmapBounds.Width()) / 2,
|
(viewBounds.Width() - destinationBitmapBounds.Width()) / 2,
|
||||||
(viewBounds.Height() - destinationBitmapBounds.Height()) / 2);
|
(viewBounds.Height() - destinationBitmapBounds.Height()) / 2);
|
||||||
//}
|
//}
|
||||||
tile = B_TILE_BITMAP;
|
options |= B_TILE_BITMAP;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// switch to the bitmap and force a redraw
|
// switch to the bitmap and force a redraw
|
||||||
view->SetViewBitmap(bitmap, bitmapBounds, destinationBitmapBounds,
|
view->SetViewBitmap(bitmap, bitmapBounds, destinationBitmapBounds,
|
||||||
followFlags, tile);
|
followFlags, options);
|
||||||
view->Invalidate();
|
view->Invalidate();
|
||||||
|
|
||||||
/*if (fShowingBitmap != info) {
|
/*if (fShowingBitmap != info) {
|
||||||
|
|||||||
Reference in New Issue
Block a user