Inline TwipsToPixels and PixelsToTwips on nsIPresContext. Bug 229371, r+sr=dbaron.

This commit is contained in:
bryner%brianryner.com 2006-05-17 02:38:21 +00:00
parent 0392624b6a
commit 66d1fdd13f
2 changed files with 2 additions and 2 deletions

View File

@ -183,7 +183,7 @@ inFlasher::DrawElementOutline(nsIDOMElement* aElement)
mCSSUtils->AdjustRectForMargins(frame, rect);
float p2t;
presContext->GetPixelsToTwips(&p2t);
p2t = presContext->PixelsToTwips();
if (mInvert) {
rcontext->InvertRect(rect.x, rect.y, rect.width, rect.height);

View File

@ -210,7 +210,7 @@ inLayoutUtils::GetScreenOrigin(nsIDOMElement* aElement)
// Get the scale from that Presentation Context
float p2t;
presContext->GetPixelsToTwips(&p2t);
p2t = presContext->PixelsToTwips();
// Convert screen rect to twips
rect->x = NSIntPixelsToTwips(rect->x, p2t);