diff options
Diffstat (limited to 'include/basegfx/polygon/b2dpolypolygon.hxx')
-rw-r--r-- | include/basegfx/polygon/b2dpolypolygon.hxx | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/include/basegfx/polygon/b2dpolypolygon.hxx b/include/basegfx/polygon/b2dpolypolygon.hxx index cd22644ab8ce..efe58337a886 100644 --- a/include/basegfx/polygon/b2dpolypolygon.hxx +++ b/include/basegfx/polygon/b2dpolypolygon.hxx @@ -20,23 +20,23 @@ #ifndef _BGFX_POLYGON_B2DPOLYPOLYGON_HXX #define _BGFX_POLYGON_B2DPOLYPOLYGON_HXX +#include <ostream> +#include <vector> + #include <sal/types.h> #include <o3tl/cow_wrapper.hxx> #include <basegfx/range/b2drange.hxx> #include <basegfx/basegfxdllapi.h> -#include <vector> +#include <basegfx/polygon/b2dpolygon.hxx> // predeclarations class ImplB2DPolyPolygon; namespace basegfx { - class B2DPolygon; class B2DHomMatrix; } // end of namespace basegfx -////////////////////////////////////////////////////////////////////////////// - namespace basegfx { class BASEGFX_DLLPUBLIC B2DPolyPolygon @@ -132,6 +132,22 @@ namespace basegfx } // end of namespace basegfx +template< typename charT, typename traits > +inline std::basic_ostream<charT, traits> & operator <<( + std::basic_ostream<charT, traits> & stream, const basegfx::B2DPolyPolygon& poly ) +{ + stream << "[" << poly.count() << ":"; + for (sal_uInt32 i = 0; i < poly.count(); i++) + { + if (i > 0) + stream << ","; + stream << poly.getB2DPolygon(i); + } + stream << "]"; + + return stream; +} + #endif /* _BGFX_POLYGON_B2DPOLYPOLYGON_HXX */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |