Bug 375909 - nsCanvasRenderingContext2d incorrectly calculates some coordinates (has appunits * appunits, not appunits/appunits)

p=Jeremy Lea <reg@freebsd.org>
r+sr=roc
This commit is contained in:
asqueella%gmail.com 2007-04-27 14:45:21 +00:00
Родитель 0bebdb62cd
Коммит 33287c452b
1 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -2667,10 +2667,11 @@ nsCanvasRenderingContext2D::DrawWindow(nsIDOMWindow* aWindow, PRInt32 aX, PRInt3
rv = rootFrame->BuildDisplayListForStackingContext(&builder, r, &list);
if (NS_SUCCEEDED(rv)) {
float t2p = presContext->AppUnitsPerDevPixel();
nscoord appUnitsPerDevPixel = presContext->AppUnitsPerDevPixel();
// Ensure that r.x,r.y gets drawn at (0,0)
mThebesContext->Save();
mThebesContext->Translate(gfxPoint(-r.x*t2p, -r.y*t2p));
mThebesContext->Translate(gfxPoint(-NSAppUnitsToFloatPixels(r.x,appUnitsPerDevPixel),
-NSAppUnitsToFloatPixels(r.y,appUnitsPerDevPixel)));
nsIDeviceContext* devCtx = presContext->DeviceContext();
nsCOMPtr<nsIRenderingContext> rc;