Bug 1025553, part 5 - Add some missing gfxMatrix API to Moz2D Matrix. r=Bas

This commit is contained in:
Jonathan Watt 2014-07-11 08:06:39 +01:00
parent b45be5817c
commit 5d70a0f6cc

View File

@ -72,6 +72,11 @@ public:
return *this;
}
Matrix &Translate(const Point &aPoint)
{
return Translate(aPoint.x, aPoint.y);
}
Matrix &PostTranslate(Float aX, Float aY)
{
@ -80,6 +85,11 @@ public:
return *this;
}
Matrix &PostTranslate(const Point &aPoint)
{
return PostTranslate(aPoint.x, aPoint.y);
}
Matrix &Rotate(Float aAngle)
{
return *this = Matrix::Rotation(aAngle) * *this;
@ -193,6 +203,13 @@ public:
!FuzzyEqual(_32, floor(_32 + 0.5));
}
/**
* Returns true if the matrix only has an integer translation.
*/
bool HasOnlyIntegerTranslation() const {
return !HasNonIntegerTranslation();
}
/**
* Returns true if the matrix has any transform other
* than a straight translation.