зеркало из https://github.com/mozilla/gecko-dev.git
Bug 945203. Part 7: Add ScaleRegionToOutsidePixels. r=mattwoodrow
--HG-- extra : rebase_source : 1c54863818607c45d04249e5df407b3fb3af40dd
This commit is contained in:
Родитель
6191abbe99
Коммит
4732dc025c
|
@ -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;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче