From fd49bce12e621e25ff992bdbc6057d1be7fd183f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Sun, 17 Sep 2006 11:55:23 +0000 Subject: [PATCH] * For DrawBitmap(), the bitmap rect needs to be aligned onto pixels just like the view rect. This fixes bug 721. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18872 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/servers/app/drawing/Painter/Painter.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/servers/app/drawing/Painter/Painter.cpp b/src/servers/app/drawing/Painter/Painter.cpp index 5603653d80..e5b6a2818e 100644 --- a/src/servers/app/drawing/Painter/Painter.cpp +++ b/src/servers/app/drawing/Painter/Painter.cpp @@ -1354,8 +1354,10 @@ Painter::_DrawBitmap(agg::rendering_buffer& srcBuffer, color_space format, return; } - if (!fSubpixelPrecise) + if (!fSubpixelPrecise) { align_rect_to_pixels(&viewRect); + align_rect_to_pixels(&bitmapRect); + } double xScale = (viewRect.Width() + 1) / (bitmapRect.Width() + 1); double yScale = (viewRect.Height() + 1) / (bitmapRect.Height() + 1);