reverting part of previous change, this was breaking the working part of scaling, still some bugs though

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18019 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jérôme Duval 2006-07-03 22:51:57 +00:00
parent a950a7fffa
commit ae3b2d5af2

View File

@ -1327,6 +1327,12 @@ Painter::_DrawBitmap(agg::rendering_buffer& srcBuffer, color_space format,
if (!fSubpixelPrecise)
align_rect_to_pixels(&viewRect);
double xScale = (viewRect.Width() + 1) / (bitmapRect.Width() + 1);
double yScale = (viewRect.Height() + 1) / (bitmapRect.Height() + 1);
if (xScale == 0.0 || yScale == 0.0)
return;
// compensate for the lefttop offset the actualBitmapRect might have
// actualBitmapRect has the right size, but put it at B_ORIGIN
@ -1356,12 +1362,6 @@ Painter::_DrawBitmap(agg::rendering_buffer& srcBuffer, color_space format,
bitmapRect.bottom = actualBitmapRect.bottom;
}
double xScale = (viewRect.Width() + 1) / (bitmapRect.Width() + 1);
double yScale = (viewRect.Height() + 1) / (bitmapRect.Height() + 1);
if (xScale == 0.0 || yScale == 0.0)
return;
double xOffset = viewRect.left - bitmapRect.left;
double yOffset = viewRect.top - bitmapRect.top;