Kaydet (Commit) cc18a06a authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Printing of some more basegfx types

...as will be needed by some upcoming replacements of CPPUNIT_ASSERT with
CPPUNIT_ASSERT_EQUAL

Change-Id: I24ede3cc287bcc3b5e73eb400e4044c469657659
üst cd7cd534
......@@ -20,6 +20,10 @@
#ifndef INCLUDED_BASEGFX_COLOR_BCOLOR_HXX
#define INCLUDED_BASEGFX_COLOR_BCOLOR_HXX
#include <sal/config.h>
#include <ostream>
#include <basegfx/tuple/b3dtuple.hxx>
#include <vector>
#include <basegfx/basegfxdllapi.h>
......@@ -173,6 +177,15 @@ namespace basegfx
}
};
template<typename charT, typename traits>
std::basic_ostream<charT, traits> & operator <<(
std::basic_ostream<charT, traits> & stream, BColor const & color)
{
return stream
<< '[' << color.getRed() << ", " << color.getGreen() << ", "
<< color.getBlue() << ']';
}
} // end of namespace basegfx
#endif // INCLUDED_BASEGFX_COLOR_BCOLOR_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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment