mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
Bug 1025553, part 5 - Add some missing gfxMatrix API to Moz2D Matrix. r=Bas
This commit is contained in:
parent
b45be5817c
commit
5d70a0f6cc
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user