Fixed GetDeviceSurfaceDimensions() so the width and height are in appunits, and the routines who use them will convert properly.
git-svn-id: svn://10.0.0.236/trunk@44835 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
d7e1f74167
commit
63cd34d3cf
@ -325,9 +325,13 @@ NS_IMETHODIMP nsDeviceContextMac::GetDeviceSurfaceDimensions(PRInt32 &aWidth, PR
|
||||
// FIXME: could just union all of the GDevice rectangles together.
|
||||
RgnHandle grayRgn = ::GetGrayRgn();
|
||||
Rect bounds = (**grayRgn).rgnBBox;
|
||||
aWidth = bounds.right - bounds.left;
|
||||
aHeight = bounds.bottom - bounds.top;
|
||||
return NS_OK;
|
||||
//aWidth = bounds.right - bounds.left;
|
||||
//aHeight = bounds.bottom - bounds.top;
|
||||
|
||||
aHeight = NSToIntRound((bounds.bottom - bounds.top)*mDevUnitsToAppUnits);
|
||||
aWidth = NSToIntRound((bounds.right - bounds.left) * mDevUnitsToAppUnits);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -325,9 +325,13 @@ NS_IMETHODIMP nsDeviceContextMac::GetDeviceSurfaceDimensions(PRInt32 &aWidth, PR
|
||||
// FIXME: could just union all of the GDevice rectangles together.
|
||||
RgnHandle grayRgn = ::GetGrayRgn();
|
||||
Rect bounds = (**grayRgn).rgnBBox;
|
||||
aWidth = bounds.right - bounds.left;
|
||||
aHeight = bounds.bottom - bounds.top;
|
||||
return NS_OK;
|
||||
//aWidth = bounds.right - bounds.left;
|
||||
//aHeight = bounds.bottom - bounds.top;
|
||||
|
||||
aHeight = NSToIntRound((bounds.bottom - bounds.top)*mDevUnitsToAppUnits);
|
||||
aWidth = NSToIntRound((bounds.right - bounds.left) * mDevUnitsToAppUnits);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user