зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
6548e35e34
Коммит
78b98638bb
|
@ -2667,10 +2667,11 @@ nsCanvasRenderingContext2D::DrawWindow(nsIDOMWindow* aWindow, PRInt32 aX, PRInt3
|
||||||
|
|
||||||
rv = rootFrame->BuildDisplayListForStackingContext(&builder, r, &list);
|
rv = rootFrame->BuildDisplayListForStackingContext(&builder, r, &list);
|
||||||
if (NS_SUCCEEDED(rv)) {
|
if (NS_SUCCEEDED(rv)) {
|
||||||
float t2p = presContext->AppUnitsPerDevPixel();
|
nscoord appUnitsPerDevPixel = presContext->AppUnitsPerDevPixel();
|
||||||
// Ensure that r.x,r.y gets drawn at (0,0)
|
// Ensure that r.x,r.y gets drawn at (0,0)
|
||||||
mThebesContext->Save();
|
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();
|
nsIDeviceContext* devCtx = presContext->DeviceContext();
|
||||||
nsCOMPtr<nsIRenderingContext> rc;
|
nsCOMPtr<nsIRenderingContext> rc;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче