summaryrefslogtreecommitdiff
path: root/include/tools
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2020-09-26 14:41:02 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-09-26 17:39:33 +0200
commit5cb62b13ca8fec43fffe3f2000f61c1be7c5616c (patch)
tree80a23ff0f16c91e9aa0e0bfb98b66d96527c25a4 /include/tools
parent949d648594f441dbb7e9c600d7925fba7e882ff9 (diff)
revert recent Polygon commits
This reverts commit 0cabffc05f3b40f5ee897df73475e09a3c05fc7 tools::PolyPolygon -> basegfx in canvas and commit 2c5d5a6d55a1ebd153f05523972a2c625484bde2 tools::PolyPolygon -> basegfx in filter Comment from quikee: The interpretation of integer polygons and floating point polygons (or any other float vs. int drawing primitives) are different, so you have to be really careful when changing, that the result after the change is still the same. A big problem is that we still have the metafile in OutputDevice, which is completely integer based - so there will be conversions that go from int representation to float representation to int again and to float (because backend is in floating point) and I really fear that because of this there will be regressions and even if not, it could make changing later more painful. This is the reason I wouldn't change these things without having tests that would show when there is a difference in rendering. Change-Id: I54addca4e5a72196b5f77f6c7689eb716451c1dd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103483 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/tools')
-rw-r--r--include/tools/gen.hxx16
1 files changed, 0 insertions, 16 deletions
diff --git a/include/tools/gen.hxx b/include/tools/gen.hxx
index 0acef174718c..4f6927c62f0b 100644
--- a/include/tools/gen.hxx
+++ b/include/tools/gen.hxx
@@ -25,8 +25,6 @@
#include <algorithm>
#include <ostream>
#include <config_options.h>
-#include <basegfx/point/b2dpoint.hxx>
-#include <basegfx/range/b2drectangle.hxx>
class SvStream;
namespace rtl
@@ -75,7 +73,6 @@ 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; }
@@ -106,8 +103,6 @@ public:
Pair const & toPair() const { return *this; }
Pair & toPair() { return *this; }
- operator basegfx::B2DPoint() const { return basegfx::B2DPoint(nA, nB); }
-
using Pair::toString;
};
@@ -390,7 +385,6 @@ public:
/// Constructs an empty Rectangle, with top/left at the specified params
Rectangle( long nLeft, long nTop );
Rectangle( const Point& rLT, const Size& rSize );
- Rectangle( basegfx::B2DRectangle const & );
static Rectangle Justify( const Point& rLT, const Point& rRB );
@@ -486,8 +480,6 @@ 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;
@@ -534,14 +526,6 @@ inline tools::Rectangle::Rectangle( const Point& rLT, const Size& rSize )
nBottom = rSize.Height() ? nTop+(rSize.Height()-1) : RECT_EMPTY;
}
-inline tools::Rectangle::Rectangle( const basegfx::B2DRectangle& rRect )
-{
- nLeft = rRect.getMinX();
- nTop = rRect.getMinY();
- nRight = !rRect.isEmpty() ? rRect.getMaxX() : RECT_EMPTY;
- nBottom = !rRect.isEmpty() ? rRect.getMaxY() : RECT_EMPTY;
-}
-
inline bool tools::Rectangle::IsEmpty() const
{
return (nRight == RECT_EMPTY) || (nBottom == RECT_EMPTY);