diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2018-07-05 18:30:34 +0200 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2018-07-06 10:47:31 +0200 |
commit | d4125bd04bd58972594510bf6ab5614693e25833 (patch) | |
tree | d9edc18b55bd3e59b02494c6022676e4e661286f /include/vcl | |
parent | e2320955b32595df09c9c4412ccec56a0b273df7 (diff) |
Add ostream::operator<< for SalTwoRect
Change-Id: I4466ebb154acd8046927db6b945b04c85095b87e
Diffstat (limited to 'include/vcl')
-rw-r--r-- | include/vcl/salgtype.hxx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/vcl/salgtype.hxx b/include/vcl/salgtype.hxx index 0e37300f3dbd..d920ede00dac 100644 --- a/include/vcl/salgtype.hxx +++ b/include/vcl/salgtype.hxx @@ -23,6 +23,8 @@ #include <sal/types.h> #include <o3tl/typed_flags_set.hxx> #include <tools/color.hxx> +#include <tools/gen.hxx> +#include <ostream> enum class DeviceFormat { NONE = -1, @@ -63,6 +65,19 @@ struct SalTwoRect } }; +template <typename charT, typename traits> +inline std::basic_ostream<charT, traits>& operator<<(std::basic_ostream<charT, traits>& stream, + const SalTwoRect& rPosAry) +{ + tools::Rectangle aSrcRect(rPosAry.mnSrcX, rPosAry.mnSrcY, rPosAry.mnSrcX + rPosAry.mnSrcWidth, + rPosAry.mnSrcY + rPosAry.mnSrcHeight); + tools::Rectangle aDestRect(rPosAry.mnDestX, rPosAry.mnDestY, + rPosAry.mnDestX + rPosAry.mnDestWidth, + rPosAry.mnDestY + rPosAry.mnDestHeight); + stream << aSrcRect << " => " << aDestRect; + return stream; +} + enum class SalROPColor { N0, N1, Invert }; |