Bug 1065526, part 2 - Add a Copy() method to gfxMatrix. r=Bas

This commit is contained in:
Jonathan Watt 2014-09-10 21:41:51 +01:00
parent 095dda6b06
commit 7d10bb93f7

View File

@ -9,6 +9,7 @@
#include "gfxPoint.h"
#include "gfxTypes.h"
#include "gfxRect.h"
#include "mozilla/Attributes.h"
// XX - I don't think this class should use gfxFloat at all,
// but should use 'double' and be called gfxDoubleMatrix;
@ -50,6 +51,10 @@ public:
_21(c), _22(d),
_31(tx), _32(ty) { }
MOZ_ALWAYS_INLINE gfxMatrix Copy() const {
return gfxMatrix(*this);
}
friend std::ostream& operator<<(std::ostream& stream, const gfxMatrix& m) {
if (m.IsIdentity()) {
return stream << "[identity]";