prevent drawing bitmaps at fractional offsets
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15732 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
8d66d23e83
commit
835a0aaf32
@ -1302,6 +1302,13 @@ void
|
||||
Painter::_DrawBitmap(const agg::rendering_buffer& srcBuffer, color_space format,
|
||||
BRect actualBitmapRect, BRect bitmapRect, BRect viewRect) const
|
||||
{
|
||||
if (!fSubpixelPrecise) {
|
||||
// round off viewRect (in a way avoiding too much distortion)
|
||||
viewRect.OffsetTo(roundf(viewRect.left), roundf(viewRect.top));
|
||||
viewRect.right = roundf(viewRect.right);
|
||||
viewRect.bottom = roundf(viewRect.bottom);
|
||||
}
|
||||
|
||||
switch (format) {
|
||||
case B_RGB32:
|
||||
case B_RGBA32:
|
||||
|
Loading…
Reference in New Issue
Block a user