From cf1979e3a5aed6b2bde2c75afb0e31f4d2014d08 Mon Sep 17 00:00:00 2001 From: "bryner%netscape.com" Date: Fri, 18 Jan 2002 02:05:50 +0000 Subject: [PATCH] Backing out my fix for bug 104544, it is causing artifacts to appear around the edges of images in the chrome. a=dbaron. --- gfx/src/nsRenderingContextImpl.cpp | 9 ++++----- gfx/src/shared/nsRenderingContextImpl.cpp | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/gfx/src/nsRenderingContextImpl.cpp b/gfx/src/nsRenderingContextImpl.cpp index 5163f202605..8b5db8bbfd9 100644 --- a/gfx/src/nsRenderingContextImpl.cpp +++ b/gfx/src/nsRenderingContextImpl.cpp @@ -891,12 +891,11 @@ NS_IMETHODIMP nsRenderingContextImpl::DrawImage(imgIContainer *aImage, const nsR mTranMatrix->TransformCoord(&pt.x, &pt.y); sr = *aSrcRect; + mTranMatrix->TransformCoord(&sr.x, &sr.y, &sr.width, &sr.height); - nsCOMPtr dc; - GetDeviceContext(*getter_AddRefs(dc)); - float t2p; - dc->GetAppUnitsToDevUnits(t2p); - sr.ScaleRoundOut(t2p); + sr.x = aSrcRect->x; + sr.y = aSrcRect->y; + mTranMatrix->TransformNoXLateCoord(&sr.x, &sr.y); nsCOMPtr iframe; aImage->GetCurrentFrame(getter_AddRefs(iframe)); diff --git a/gfx/src/shared/nsRenderingContextImpl.cpp b/gfx/src/shared/nsRenderingContextImpl.cpp index 5163f202605..8b5db8bbfd9 100644 --- a/gfx/src/shared/nsRenderingContextImpl.cpp +++ b/gfx/src/shared/nsRenderingContextImpl.cpp @@ -891,12 +891,11 @@ NS_IMETHODIMP nsRenderingContextImpl::DrawImage(imgIContainer *aImage, const nsR mTranMatrix->TransformCoord(&pt.x, &pt.y); sr = *aSrcRect; + mTranMatrix->TransformCoord(&sr.x, &sr.y, &sr.width, &sr.height); - nsCOMPtr dc; - GetDeviceContext(*getter_AddRefs(dc)); - float t2p; - dc->GetAppUnitsToDevUnits(t2p); - sr.ScaleRoundOut(t2p); + sr.x = aSrcRect->x; + sr.y = aSrcRect->y; + mTranMatrix->TransformNoXLateCoord(&sr.x, &sr.y); nsCOMPtr iframe; aImage->GetCurrentFrame(getter_AddRefs(iframe));