From 2f5eb047d9e05be5e68549ef6b75070d2faa7d2f Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Sat, 11 Oct 2008 11:16:23 -0400 Subject: Merging from trunk (bzr r6884) --- src/display/sp-canvas.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src/display/sp-canvas.cpp') diff --git a/src/display/sp-canvas.cpp b/src/display/sp-canvas.cpp index fd124aa1e..d82e39238 100644 --- a/src/display/sp-canvas.cpp +++ b/src/display/sp-canvas.cpp @@ -29,6 +29,7 @@ #include #include +#include #include #include "display-forward.h" #include @@ -773,7 +774,7 @@ static void sp_canvas_group_update (SPCanvasItem *item, Geom::Matrix const &affine, unsigned int flags) { SPCanvasGroup const *group = SP_CANVAS_GROUP (item); - NR::ConvexHull corners(Geom::Point(0, 0)); + Geom::RectHull corners(Geom::Point(0, 0)); bool empty=true; for (GList *list = group->items; list; list = list->next) { @@ -783,7 +784,7 @@ sp_canvas_group_update (SPCanvasItem *item, Geom::Matrix const &affine, unsigned if ( i->x2 > i->x1 && i->y2 > i->y1 ) { if (empty) { - corners = NR::ConvexHull(Geom::Point(i->x1, i->y1)); + corners = Geom::RectHull(Geom::Point(i->x1, i->y1)); empty = false; } else { corners.add(Geom::Point(i->x1, i->y1)); @@ -792,12 +793,12 @@ sp_canvas_group_update (SPCanvasItem *item, Geom::Matrix const &affine, unsigned } } - boost::optional const bounds = corners.bounds(); + boost::optional const bounds = corners.bounds(); if (bounds) { - item->x1 = bounds->min()[NR::X]; - item->y1 = bounds->min()[NR::Y]; - item->x2 = bounds->max()[NR::X]; - item->y2 = bounds->max()[NR::Y]; + item->x1 = bounds->min()[Geom::X]; + item->y1 = bounds->min()[Geom::Y]; + item->x2 = bounds->max()[Geom::X]; + item->y2 = bounds->max()[Geom::Y]; } else { // FIXME ? item->x1 = item->x2 = item->y1 = item->y2 = 0; -- cgit v1.2.3