summaryrefslogtreecommitdiffstats
path: root/src/2geom
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2012-02-19 19:56:03 +0000
committerJohan Engelen <goejendaagh@zonnet.nl>2012-02-19 19:56:03 +0000
commit5014662ec90a3ec0eb1c5fc261063415eb3f09e0 (patch)
tree237e911051fa8be167957d3bbfaf0a9a70006d8d /src/2geom
parentbad bug in 2geom (diff)
downloadinkscape-5014662ec90a3ec0eb1c5fc261063415eb3f09e0.tar.gz
inkscape-5014662ec90a3ec0eb1c5fc261063415eb3f09e0.zip
remove superfluous RectHull
(bzr r11001)
Diffstat (limited to 'src/2geom')
-rw-r--r--src/2geom/CMakeLists.txt1
-rw-r--r--src/2geom/Makefile_insert1
-rw-r--r--src/2geom/rect-hull.h69
3 files changed, 0 insertions, 71 deletions
diff --git a/src/2geom/CMakeLists.txt b/src/2geom/CMakeLists.txt
index 9a4cb9efd..b1c30f678 100644
--- a/src/2geom/CMakeLists.txt
+++ b/src/2geom/CMakeLists.txt
@@ -103,7 +103,6 @@ set(2geom_SRC
quadtree.h
ray.h
rect.h
- rect-hull.h
region.h
sbasis-2d.h
sbasis-curve.h
diff --git a/src/2geom/Makefile_insert b/src/2geom/Makefile_insert
index 1adc0a0c8..e3b6fcdab 100644
--- a/src/2geom/Makefile_insert
+++ b/src/2geom/Makefile_insert
@@ -79,7 +79,6 @@
2geom/ray.h \
2geom/rect.cpp \
2geom/rect.h \
- 2geom/rect-hull.h \
2geom/region.cpp \
2geom/region.h \
2geom/sbasis-2d.cpp \
diff --git a/src/2geom/rect-hull.h b/src/2geom/rect-hull.h
deleted file mode 100644
index 074fad29f..000000000
--- a/src/2geom/rect-hull.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright 2004 MenTaLguY <mental@rydia.net>
- *
- * This code is licensed under the GNU GPL; see COPYING for more information.
- */
-
-#ifndef GEOM_RECT_HULL_H
-#define GEOM_RECT_HULL_H
-
-#include <2geom/rect.h>
-
-namespace Geom {
-
-/**
- * A class representing a rectangular convex hull of a set of points.
- */
-class RectHull {
-public:
- RectHull() : _bounds() {}
- explicit RectHull(Point const &p) : _bounds(Rect(p, p)) {}
-
- boost::optional<Point> midpoint() const {
- if (_bounds) {
- return _bounds->midpoint();
- } else {
- return boost::optional<Point>();
- }
- }
-
- void add(Point const &p) {
- if (_bounds) {
- _bounds->expandTo(p);
- } else {
- _bounds = Rect(p, p);
- }
- }
- void add(Rect const &r) {
- // Note that this is a hack. when convexhull actually works
- // you will need to add all four points.
- _bounds.unionWith(r);
- }
- void add(RectHull const &h) {
- if (h._bounds) {
- add(*h._bounds);
- }
- }
-
- OptRect const &bounds() const {
- return _bounds;
- }
-
-private:
- OptRect _bounds;
-};
-
-} /* namespace Geom */
-
-#endif // GEOM_RECT_HULL_H
-
-/*
- Local Variables:
- mode:c++
- c-file-style:"stroustrup"
- c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
- indent-tabs-mode:nil
- fill-column:99
- End:
-*/
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :