diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/helper/geom.cpp | 12 | ||||
| -rw-r--r-- | src/helper/geom.h | 2 | ||||
| -rw-r--r-- | src/main.cpp | 2 |
3 files changed, 1 insertions, 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<Geom::Point> &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 |
