[pencil tool] dots are created with wrong cy value (GUI instead of SVG coordinate system)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
Fix Released
|
Low
|
Johan Engelen |
Bug Description
Dots created with the pencil (freehand) tool have a wrong cy value stored in the SVG source (verified in the XML Editor right after creation): cy is stored relative to the (ruler) origin of the GUI in the lower left corner of the page instead of relative to the SVG origin in the upper left corner of the page. The representation on on-canvas at creation time does not reflect the data stored in SVG notation.
Steps to reproduce:
1) create a dot with the pencil tool (Ctrl+click)
1a) alternatively use the pen tool in straight line mode (Ctrl+click)
2) duplicate the dot
Expected result:
The duplicate stays at the same x,y-position as the original.
Actual result:
The duplicate is moved to the mirrored y coordinate.
reproduced with Inkscape 0.47+devel r9515 on OS X 10.5.8
not reproduced with Inkscape 0.47 r22583
reported by Johan on irc (2010-06-21)
Related branches
Changed in inkscape: | |
assignee: | Johan Engelen (johanengelen) → nobody |
Changed in inkscape: | |
milestone: | none → 0.49 |
For me, this fixes it:
=== modified file 'src/draw- context. cpp' context. cpp 2010-01-23 13:36:56 +0000 context. cpp 2010-06-22 21:58:53 +0000 :Preferences *prefs = Inkscape: :Preferences: :get();
--- src/draw-
+++ src/draw-
@@ -837,7 +837,7 @@
Inkscape:
Geom::Matrix const i2d (sp_item_i2d_affine (item)); getDouble( tool_path + "/dot-size", 3.0); repr_set_ svg_double (repr, "sodipodi:rx", rad * stroke_width); repr_set_ svg_double (repr, "sodipodi:ry", rad * stroke_width); >updateRepr( ); set_item_ transform( item, i2d.inverse());
- Geom::Point pp = pt;
+ Geom::Point pp = pt * i2d.inverse();
double rad = 0.5 * prefs->
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 @@
sp_
sp_
item-
- sp_item_
sp_ desktop_ selection( desktop) ->set(item) ;