Bug 1168427 - Add a PostScale method to Moz2D's Matrix class. r=Bas

This commit is contained in:
Jonathan Watt 2015-05-14 16:47:20 +01:00
parent 3480548f99
commit 708e1d7afe

View File

@ -153,7 +153,22 @@ public:
return *this;
}
/**
* Similar to PostTranslate, but applies a scale instead of a translation.
*/
Matrix &PostScale(Float aScaleX, Float aScaleY)
{
_11 *= aScaleX;
_12 *= aScaleY;
_21 *= aScaleX;
_22 *= aScaleY;
_31 *= aScaleX;
_32 *= aScaleY;
return *this;
}
GFX2D_API static Matrix Rotation(Float aAngle);
/**