summaryrefslogtreecommitdiff
path: root/include/tools/gen.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'include/tools/gen.hxx')
-rw-r--r--include/tools/gen.hxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/tools/gen.hxx b/include/tools/gen.hxx
index 4f6927c62f0b..14ded16a8f0a 100644
--- a/include/tools/gen.hxx
+++ b/include/tools/gen.hxx
@@ -25,6 +25,8 @@
#include <algorithm>
#include <ostream>
#include <config_options.h>
+#include <basegfx/point/b2dpoint.hxx>
+#include <basegfx/range/b2drectangle.hxx>
class SvStream;
namespace rtl
@@ -73,6 +75,7 @@ class SAL_WARN_UNUSED UNLESS_MERGELIBS(SAL_DLLPUBLIC_EXPORT) Point final : prote
public:
Point() {}
Point( long nX, long nY ) : Pair( nX, nY ) {}
+ Point(basegfx::B2DPoint const & rPoint) : Pair(rPoint.getX(), rPoint.getY()) {}
long X() const { return nA; }
long Y() const { return nB; }
@@ -103,6 +106,8 @@ public:
Pair const & toPair() const { return *this; }
Pair & toPair() { return *this; }
+ operator basegfx::B2DPoint() const { return basegfx::B2DPoint(nA, nB); }
+
using Pair::toString;
};
@@ -480,6 +485,8 @@ public:
void SaturatingSetX(long x);
void SaturatingSetY(long y);
+ operator basegfx::B2DRectangle() const { return basegfx::B2DRectangle(nLeft, nTop, nRight, nBottom); }
+
private:
long nLeft;
long nTop;