Scaling stroke width by percentage gives wrong stroke width

Bug #1742659 reported by Oliver Arend
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Confirmed
Undecided
Unassigned

Bug Description

If I select objects with different stroke widths the width is displayed as 100% in the "Fill and Stroke" window. If I now change the stroke width to 50%, I expect all stroke widths to be reduced to 50% of their respective original value.

For example, I have two tetragons with stroke widths of 0.5 mm and 0.25 mm. If I select both of them and apply 50% stroke width (expecting 0.25 mm and 0.125 mm), I get 0.22 and 0.11 mm, and after pressing Ctrl+Z once, I get 0.234 mm and 0.117 mm. Only after pressing Ctrl+Z a second time do I get back to the original value. The ratio of resulting value to desired value (0.22/0.25=0.88; 0.936 after pressing Ctrl+Z once) is consistent for this setup, regardless of the actual stroke width chosen (tested with 50%, 75%, 150%).

Bug #170219 https://bugs.launchpad.net/inkscape/+bug/170219 seems to be related, but does not explain these strange values.

Revision history for this message
TylerDurden (8thrule) wrote :

Confirmed in Win 8.1 64 bit, Inkscape 0.92.2 (5c3e80d, 2017-08-06).

Likely related to https://bugs.launchpad.net/inkscape/+bug/1670913 "Default.svg using mm as units and scale of 1 causes problems"

The scale of the document has effect.

Changing the document to px and scale=1, behavior is as expected. (if document =mm, scale should be set to 3.77953 for proper behavior.) Example attached.

Please share an svg example, or confirm the document units and scale.

Best,
TD

TylerDurden (8thrule)
Changed in inkscape:
status: New → Confirmed
Revision history for this message
Oliver Arend (oarend) wrote :

Right now I'm using Linux Mint 17.1 64 bit, Inkscape 0.92.2

I can confirm that the behavior is as it should be with
- document unit: mm, document scale factor: 3.77953
- document unit: px, document scale factor: 1

The width after scaling by 50% is (current scale factor/proper scale factor)^2 times what it should be, e.g. with millimeters and scale factor set to 1 instead of 3.77953 the stroke width will be (1/3.77953)^2 ~= 1/14.3 = 0.07 times as wide as it should be.

Revision history for this message
TylerDurden (8thrule) wrote :

Thank you for your testing.

I also see an issue trying to simply use the stroke percent tool on a single object, which is reported here: https://bugs.launchpad.net/inkscape/+bug/1673096

I had not seen this report, but it looks like it has the same roots as this report. When the units are px and scale is 1, behavior is as expected.

However, when using mm and scale 3.77953, the scale issue is resolved., but the percent tool will not activate and the units revert to the previous indicator (in, mm, etc.) before a change can even be made to the percent value.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.