mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1120609 - Printing support for gfx::Matrix. r=Bas
--HG-- extra : rebase_source : 38e46208c14df09dc49c73c7fddfc3b5534efd4c
This commit is contained in:
parent
c120f78b00
commit
c888ca7137
@ -6,6 +6,7 @@
|
||||
#include "Matrix.h"
|
||||
#include "Tools.h"
|
||||
#include <algorithm>
|
||||
#include <ostream>
|
||||
#include <math.h>
|
||||
|
||||
#include "mozilla/FloatingPoint.h" // for UnspecifiedNaN
|
||||
@ -15,6 +16,18 @@ using namespace std;
|
||||
namespace mozilla {
|
||||
namespace gfx {
|
||||
|
||||
std::ostream&
|
||||
operator<<(std::ostream& aStream, const Matrix& aMatrix)
|
||||
{
|
||||
return aStream << "[ " << aMatrix._11
|
||||
<< " " << aMatrix._12
|
||||
<< "; " << aMatrix._21
|
||||
<< " " << aMatrix._22
|
||||
<< "; " << aMatrix._31
|
||||
<< " " << aMatrix._32
|
||||
<< "; ]";
|
||||
}
|
||||
|
||||
Matrix
|
||||
Matrix::Rotation(Float aAngle)
|
||||
{
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include "Types.h"
|
||||
#include "Rect.h"
|
||||
#include "Point.h"
|
||||
#include <iosfwd>
|
||||
#include <math.h>
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/DebugOnly.h"
|
||||
@ -43,6 +44,8 @@ public:
|
||||
return Matrix(*this);
|
||||
}
|
||||
|
||||
friend std::ostream& operator<<(std::ostream& aStream, const Matrix& aMatrix);
|
||||
|
||||
Point operator *(const Point &aPoint) const
|
||||
{
|
||||
Point retPoint;
|
||||
|
Loading…
Reference in New Issue
Block a user