From efa82e348fcc921fc3d6dc5065c933a2f0f67f6b Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Wed, 23 Jun 2010 00:23:28 +0200 Subject: fix wrong transform for dot drawing with pen or pencil tool Fixed bugs: - https://launchpad.net/bugs/597136 (bzr r9529) --- src/draw-context.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/draw-context.cpp') diff --git a/src/draw-context.cpp b/src/draw-context.cpp index da22c8a7a..3049f3a6a 100644 --- a/src/draw-context.cpp +++ b/src/draw-context.cpp @@ -837,7 +837,7 @@ void spdc_create_single_dot(SPEventContext *ec, Geom::Point const &pt, char cons Inkscape::Preferences *prefs = Inkscape::Preferences::get(); Geom::Matrix const i2d (sp_item_i2d_affine (item)); - Geom::Point pp = pt; + Geom::Point pp = pt * i2d.inverse(); double rad = 0.5 * prefs->getDouble(tool_path + "/dot-size", 3.0); if (event_state & GDK_MOD1_MASK) { /* TODO: We vary the dot size between 0.5*rad and 1.5*rad, where rad is the dot size @@ -856,7 +856,6 @@ void spdc_create_single_dot(SPEventContext *ec, Geom::Point const &pt, char cons sp_repr_set_svg_double (repr, "sodipodi:rx", rad * stroke_width); sp_repr_set_svg_double (repr, "sodipodi:ry", rad * stroke_width); item->updateRepr(); - sp_item_set_item_transform(item, i2d.inverse()); sp_desktop_selection(desktop)->set(item); -- cgit v1.2.3 From 35300c9822f9f84c8a011913235fd4e5dc2c5ac8 Mon Sep 17 00:00:00 2001 From: Diederik van Lierop Date: Mon, 12 Jul 2010 07:51:13 +0200 Subject: - Snap while rotating an object using the selector tool - Rename the ConstraintLine class to SnapConstraint - Move some duplicated code to 2geom (bzr r9607) --- src/draw-context.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/draw-context.cpp') diff --git a/src/draw-context.cpp b/src/draw-context.cpp index 3049f3a6a..a531b88d1 100644 --- a/src/draw-context.cpp +++ b/src/draw-context.cpp @@ -511,7 +511,7 @@ void spdc_endpoint_snap_rotation(SPEventContext const *const ec, Geom::Point &p, /* Snap it along best vector */ SnapManager &m = SP_EVENT_CONTEXT_DESKTOP(ec)->namedview->snap_manager; m.setup(SP_EVENT_CONTEXT_DESKTOP(ec)); - m.constrainedSnapReturnByRef(p, Inkscape::SNAPSOURCE_NODE_HANDLE, Inkscape::Snapper::ConstraintLine(best)); + m.constrainedSnapReturnByRef(p, Inkscape::SNAPSOURCE_NODE_HANDLE, Inkscape::Snapper::SnapConstraint(best)); } } } -- cgit v1.2.3