From 639995ef0f5db3e72a914a7d7aa8420f1037379e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Krzysztof=20Kosi=C5=84ski?= Date: Sat, 3 Apr 2010 05:25:05 +0200 Subject: [PATCH] Fix tweak and paint bucket tools --- src/flood-context.cpp | 4 ++-- src/tweak-context.cpp | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/flood-context.cpp b/src/flood-context.cpp index 612ae1cfc..910b5dd80 100644 --- a/src/flood-context.cpp +++ b/src/flood-context.cpp @@ -798,7 +798,7 @@ static void sp_flood_do_flood_fill(SPEventContext *event_context, GdkEvent *even unsigned int height = (int)ceil(screen.height() * zoom_scale * padding); Geom::Point origin(screen.min()[Geom::X], - sp_document_height(document) - screen.height() - screen.min()[Geom::Y]); + screen.min()[Geom::Y]); origin[Geom::X] = origin[Geom::X] + (screen.width() * ((1 - padding) / 2)); origin[Geom::Y] = origin[Geom::Y] + (screen.height() * ((1 - padding) / 2)); @@ -905,7 +905,7 @@ static void sp_flood_do_flood_fill(SPEventContext *event_context, GdkEvent *even } for (unsigned int i = 0; i < fill_points.size(); i++) { - Geom::Point pw = Geom::Point(fill_points[i][Geom::X] / zoom_scale, sp_document_height(document) + (fill_points[i][Geom::Y] / zoom_scale)) * affine; + Geom::Point pw = Geom::Point(fill_points[i][Geom::X] / zoom_scale, (fill_points[i][Geom::Y] / zoom_scale)) * affine; pw[Geom::X] = (int)MIN(width - 1, MAX(0, pw[Geom::X])); pw[Geom::Y] = (int)MIN(height - 1, MAX(0, pw[Geom::Y])); diff --git a/src/tweak-context.cpp b/src/tweak-context.cpp index 13299b5a4..a34a61f53 100644 --- a/src/tweak-context.cpp +++ b/src/tweak-context.cpp @@ -448,7 +448,7 @@ sp_tweak_dilate_recursive (Inkscape::Selection *selection, SPItem *item, Geom::P if (a->contains(p)) x = 0; if (x < 1) { Geom::Point move = force * 0.5 * (cos(M_PI * x) + 1) * vector; - sp_item_move_rel(item, Geom::Translate(move[Geom::X], -move[Geom::Y])); + sp_item_move_rel(item, Geom::Translate(move[Geom::X], move[Geom::Y])); did = true; } } @@ -462,7 +462,7 @@ sp_tweak_dilate_recursive (Inkscape::Selection *selection, SPItem *item, Geom::P if (x < 1) { Geom::Point move = force * 0.5 * (cos(M_PI * x) + 1) * (reverse? (a->midpoint() - p) : (p - a->midpoint())); - sp_item_move_rel(item, Geom::Translate(move[Geom::X], -move[Geom::Y])); + sp_item_move_rel(item, Geom::Translate(move[Geom::X], move[Geom::Y])); did = true; } } @@ -477,7 +477,7 @@ sp_tweak_dilate_recursive (Inkscape::Selection *selection, SPItem *item, Geom::P if (a->contains(p)) x = 0; if (x < 1) { Geom::Point move = force * 0.5 * (cos(M_PI * x) + 1) * Geom::Point(cos(dp)*dr, sin(dp)*dr); - sp_item_move_rel(item, Geom::Translate(move[Geom::X], -move[Geom::Y])); + sp_item_move_rel(item, Geom::Translate(move[Geom::X], move[Geom::Y])); did = true; } } @@ -502,7 +502,7 @@ sp_tweak_dilate_recursive (Inkscape::Selection *selection, SPItem *item, Geom::P double x = Geom::L2(a->midpoint() - p)/radius; if (a->contains(p)) x = 0; if (x < 1) { - double angle = (reverse? force : -force) * 0.05 * (cos(M_PI * x) + 1) * M_PI; + double angle = (reverse? -force : force) * 0.05 * (cos(M_PI * x) + 1) * M_PI; sp_item_rotate_rel(item, Geom::Rotate(angle)); did = true; } -- 2.30.2