diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-04-28 14:18:54 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-04-28 14:18:54 +0200 |
commit | cc18a06a5abca3f336d2263fc8248368c08635e4 (patch) | |
tree | fa2c57f6a53d5f6696d86ca545c38bf38cd680fa /include/basegfx/matrix/b2dhommatrix.hxx | |
parent | cd7cd5342248354ab322c3722c100d2cfb525bd8 (diff) |
Printing of some more basegfx types
...as will be needed by some upcoming replacements of CPPUNIT_ASSERT with
CPPUNIT_ASSERT_EQUAL
Change-Id: I24ede3cc287bcc3b5e73eb400e4044c469657659
Diffstat (limited to 'include/basegfx/matrix/b2dhommatrix.hxx')
-rw-r--r-- | include/basegfx/matrix/b2dhommatrix.hxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/basegfx/matrix/b2dhommatrix.hxx b/include/basegfx/matrix/b2dhommatrix.hxx index 524be07bcfae..a7ab0c3f5917 100644 --- a/include/basegfx/matrix/b2dhommatrix.hxx +++ b/include/basegfx/matrix/b2dhommatrix.hxx @@ -20,6 +20,10 @@ #ifndef INCLUDED_BASEGFX_MATRIX_B2DHOMMATRIX_HXX #define INCLUDED_BASEGFX_MATRIX_B2DHOMMATRIX_HXX +#include <sal/config.h> + +#include <ostream> + #include <sal/types.h> #include <o3tl/cow_wrapper.hxx> #include <basegfx/basegfxdllapi.h> @@ -104,6 +108,18 @@ namespace basegfx aMul *= rMatA; return aMul; } + + template<typename charT, typename traits> + std::basic_ostream<charT, traits> & operator <<( + std::basic_ostream<charT, traits> & stream, B2DHomMatrix const & matrix) + { + return stream + << '[' << matrix.get(0, 0) << ' ' << matrix.get(0, 1) << ' ' + << matrix.get(0, 2) << "; " << matrix.get(1, 0) << ' ' + << matrix.get(1, 1) << ' ' << matrix.get(1, 2) << "; " + << matrix.get(2, 0) << ' ' << matrix.get(2, 1) << ' ' + << matrix.get(2, 2) << ']'; + } } // end of namespace basegfx #endif // INCLUDED_BASEGFX_MATRIX_B2DHOMMATRIX_HXX |