Wrong value set when changing the size of a horizontal (or vertical) line

Bug #452102 reported by Daniel Haertle on 2009-10-15
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Inkscape
Medium
Diederik van Lierop

Bug Description

Create a small horizontal line, e.g. a 5 px long line of stroke thickness 1 px. Now change the length to 3 px by changing the W value (the width) in the GUI. The new width will not be 3 px as expected, but 3.175 px (when the scaling of the stroke width is turned off, the width will even be 3.4 px). In addition the X-position is changed, which is not expected.

I see this bug linked to Bug #165935. Note that contrarily to there not only lines with butt cap are affected but all caps.

Version: Inkscape 0.46 and 0.47pre3 on Windows

Personally I think Inkscape should measure the positions and widths *without* the stroke width, as does Corel Draw (and as far as I remember also Illustrator), which would save a lot of headache to both users and developers.

su_v (suv-lp) wrote :

> Personally I think Inkscape should measure the positions and widths
> *without* the stroke width
already implemented in 0.47pre: set the bounding box to 'geometric' in the 'Tools' preferences. The select tool controls bar shows the height and width of the bounding box of the selected object(s), not the length of a path segment.

Note: geometric bbox is currently limited in its usefulness for numeric entry of X/Y and H/W due to bug #190557. See also related bug #212768 “Geometric and Visual bounding box and object dimensions”.

tags: added: ui ui-selection-group-layer
su_v (suv-lp) wrote :

reproduced with Inkscape 0.46+devel r22465 on OS X 10.5.8: the unexpected change of the x-coordinate when changing the width of the path bounding box (geometric h=0) in the select controls bar. Bounding box is set to 'visual'. This similar to bug #190557 and seems to be a random fraction. It doesn't happen if changing the bbox width by dragging its handles on canvas (except during dragging - which is a known effect, see bug #174046) nor when changing the width of e.g. a rectangle (geometric h≠0).

OTOH the addition of twice half-the-stroke-width to the width is not a bug but the logical consequence of the visual bounding box: When drawing the line with usual snapping modes and (I assume) visible grid, the nodes are snapping to the grid. The length of the segment thus is a multiple of the visible grid spacing, the visual bbox width is the length+2*(stroke-width/2) when scaling of stroke-width is off. (draw a path/line with length 40 px and set the stroke-width 10px to clearly see the effect visualized at each end node. Then change bbox to geometric, de- and re-select the path and compare the bounding box).

Daniel Haertle (haertle) wrote :

Thanks for showing me the 'geometric' bounding box!

Unfortunately in 'geometric' bounding box mode there is another bug: it is not possible to input values in the control W of the selector toolbar if the line has geometric h=0. [Steps to reproduce: 1) switch to geometric bounding box mode 2) draw horizontal line 3) click on selector 4) change value of W in the toolbar. Result: the value of W flips back to the old value and the line remains unchanged]

su_v (suv-lp) wrote :

Reminds me of a similar encounter with a cloned line (h=0) which doesn't show any bbox handles (geometric bbox mode), described in bug #318726 comment 7 ff.

to recap - confirmed bugs here with:
 object A = path with 1 straight segment, delta y=0
 object B = clone of object A

1) visual bbox: changing bbox width of A in controls bar also changes x
   coordinate, resize on canvas works correctly
2) geom bbox: changing bbox width of A in controls bar *not* accepted,
   only resize on canvas possible
3) geom bbox: clone B of A can't be selected nor resized on canvas,
   only with transform dialog
   changing bbox width of B in controls bar is accepted but not updated
   on canvas

su_v (suv-lp) on 2009-10-15
Changed in inkscape:
status: New → Confirmed
su_v (suv-lp) on 2010-02-22
tags: added: transformations
Changed in inkscape:
importance: Undecided → Medium
su_v (suv-lp) on 2010-07-19
tags: added: selection
removed: ui-selection-group-layer
su_v (suv-lp) wrote :

Issue 2 (see comment #4) has been filed as new report:
Bug #825840 “Horizontal and vertical lines non-resizable from secondary toolbar if bbox mode is set to geometrical”

Changed in inkscape:
assignee: nobody → Diederik van Lierop (mail-diedenrezi)

As far as I can tell, all issues mentioned above have been solved by now.

Changed in inkscape:
status: Confirmed → Fix Committed
su_v (suv-lp) on 2011-09-04
Changed in inkscape:
milestone: none → 0.49
Bryce Harrington (bryce) on 2015-02-23
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers