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
Родитель 6191abbe99
Коммит 4732dc025c
1 изменённых файлов: 12 добавлений и 3 удалений

Просмотреть файл

@ -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;