Bug 945203. Part 7: Add ScaleRegionToOutsidePixels. r=mattwoodrow

--HG--
extra : rebase_source : 1c54863818607c45d04249e5df407b3fb3af40dd
This commit is contained in:
Robert O'Callahan 2013-12-17 01:11:59 +13:00
parent d66a7ca624
commit c46b28c567

View File

@ -491,7 +491,7 @@ public:
return aRegion.ScaleToNearestPixels(mParameters.mXScale, mParameters.mYScale,
mAppUnitsPerDevPixel);
}
nsIntRect ScaleToOutsidePixels(const nsRect& aRect, bool aSnap)
nsIntRect ScaleToOutsidePixels(const nsRect& aRect, bool aSnap = false)
{
if (aSnap && mSnappingEnabled) {
return ScaleToNearestPixels(aRect);
@ -499,7 +499,7 @@ public:
return aRect.ScaleToOutsidePixels(mParameters.mXScale, mParameters.mYScale,
mAppUnitsPerDevPixel);
}
nsIntRect ScaleToInsidePixels(const nsRect& aRect, bool aSnap)
nsIntRect ScaleToInsidePixels(const nsRect& aRect, bool aSnap = false)
{
if (aSnap && mSnappingEnabled) {
return ScaleToNearestPixels(aRect);
@ -508,7 +508,7 @@ public:
mAppUnitsPerDevPixel);
}
nsIntRegion ScaleRegionToInsidePixels(const nsRegion& aRegion, bool aSnap)
nsIntRegion ScaleRegionToInsidePixels(const nsRegion& aRegion, bool aSnap = false)
{
if (aSnap && mSnappingEnabled) {
return ScaleRegionToNearestPixels(aRegion);
@ -517,6 +517,15 @@ public:
mAppUnitsPerDevPixel);
}
nsIntRegion ScaleRegionToOutsidePixels(const nsRegion& aRegion, bool aSnap = false)
{
if (aSnap && mSnappingEnabled) {
return ScaleRegionToNearestPixels(aRegion);
}
return aRegion.ScaleToOutsidePixels(mParameters.mXScale, mParameters.mYScale,
mAppUnitsPerDevPixel);
}
protected:
friend class ThebesLayerData;