round off the destination view rect of the view bitmap to avoid problems with drawing the view color around it

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15753 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus
2005-12-30 19:56:42 +00:00
parent 8d99b63e92
commit 002356d2c9
+8 -1
View File
@@ -373,7 +373,7 @@ ViewLayer::SetUserClipping(const BRegion& region)
{
fDrawState->SetClippingRegion(region);
// rebuild clipping
// rebuild clipping (for just this view)
RebuildClipping(false);
}
@@ -394,6 +394,13 @@ ViewLayer::SetViewBitmap(ServerBitmap* bitmap, BRect sourceRect,
fBitmapDestination = destRect;
fBitmapResizingMode = resizingMode;
fBitmapOptions = options;
// round off destination rect to avoid problems
// with drawing the view color around the bitmap
fBitmapDestination.OffsetTo(roundf(fBitmapDestination.left),
roundf(fBitmapDestination.top));
fBitmapDestination.right = roundf(fBitmapDestination.right);
fBitmapDestination.bottom = roundf(fBitmapDestination.bottom);
}