From 9d9699dd9cc0e86ac34a97f051ddf975bd004b8e Mon Sep 17 00:00:00 2001 From: Krzysztof Kosi??ski Date: Fri, 8 May 2015 17:37:07 +0200 Subject: Remove round_rectangle_outwards from helper/geom.h (bzr r14059.2.9) --- src/helper/geom.cpp | 12 ------------ src/helper/geom.h | 2 -- src/main.cpp | 2 +- 3 files changed, 1 insertion(+), 15 deletions(-) diff --git a/src/helper/geom.cpp b/src/helper/geom.cpp index daaf90ff2..0e97265d1 100644 --- a/src/helper/geom.cpp +++ b/src/helper/geom.cpp @@ -856,18 +856,6 @@ recursive_bezier4(const double x1, const double y1, } -/** - * rounds all corners of the rectangle 'outwards', i.e. x0 and y0 are floored, x1 and y1 are ceiled. - */ -void round_rectangle_outwards(Geom::Rect & rect) { - Geom::Interval ints[2]; - for (int i=0; i < 2; i++) { - ints[i] = Geom::Interval(std::floor(rect[i][0]), std::ceil(rect[i][1])); - } - rect = Geom::Rect(ints[0], ints[1]); -} - - namespace Geom { bool transform_equalp(Geom::Affine const &m0, Geom::Affine const &m1, Geom::Coord const epsilon) { diff --git a/src/helper/geom.h b/src/helper/geom.h index 3232d9fd5..22d770040 100644 --- a/src/helper/geom.h +++ b/src/helper/geom.h @@ -33,8 +33,6 @@ void recursive_bezier4(const double x1, const double y1, const double x2, const std::vector &pointlist, int level); -void round_rectangle_outwards(Geom::Rect & rect); - namespace Geom{ bool transform_equalp(Geom::Affine const &m0, Geom::Affine const &m1, Geom::Coord const epsilon); bool translate_equalp(Geom::Affine const &m0, Geom::Affine const &m1, Geom::Coord const epsilon); diff --git a/src/main.cpp b/src/main.cpp index 415118407..f72b6d121 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1545,7 +1545,7 @@ static int sp_do_export_png(SPDocument *doc) } if (sp_export_area_snap) { - round_rectangle_outwards(area); + area = area.roundOutwards(); } // default dpi -- cgit v1.2.3