I’m relatively new to Inkscape and I’m having trouble with the borders for a shape. This changed a fewdays\weeks ago and I can’t figure out what caused it. I’m running Inkscape 1.2.2 (732a01da63, 2022-12-09) on a win 10 machine first installed a few years ago and haven’t updated it recently. I’ve been searching forums, google, youtube, etc and can’t find anything.
I have a basic box showing a 1mm border. The borders change if I increase the box's height or width using the sizing arrows or the scale option. When the box height is changed, the top and bottom bars increase without the width, and when the width of the box is changed, the sides increase.
My example shows three boxes that were all the same size (bottom right) when they started, and you can see the stretched results.
It doesn’t matter if the “When scaling objects, scale the stroke width by the same proportion” button on the top toolbar is clicked or not. This happens to other shapes, but not to the noticeable extent of a box.
Probably your rectangle is inside a group. Possibly it's the only shape in the group. Look at the shape description in the taskbar. When you scale a group, the line widths are scaled too. Two solutions: Ungroup the shape [Object > Ugroup] or [shift+ctrl+g]. Or open the group with the select tool [double-click] or [ctrl+enter] or [right-click > Enter group] and then scale the shape.
Note that a group can contain subgroups. Your rectangle might be more than one level down in the hierarchy.
There´s also a setting in the Inkscape Preferences->Behavior->Transforms->Store transformation: Optimized or Preserved. Check you have "Optimized" enabled.
Nope - it is an actual SVG bug. Most likely been in for a long time. Inkscape doesn't use the SVG vector-effect="non-scaling-stroke" attribute. Not sure how they are going to be able to fix that easily.
I've never had a problem with it because the Preferences prevent me from encountering. But we still can´t be sure if this or the "Group-transform" is causing this here.
Correct - this only occurs when you set the transform behavior to preserved. If you set to optimized, you won't encounter this.
When set to optimized, Inkscape will appy calculations directly to the XML path data and the style width. When set to preserved, Inkscape lets the transform matrix handle the calculations and doesn't touch the actual XML path data and style. The problem comes in when you disable scaling the stroke width and have the behavior set to preserved. In this case, Inkscape should use "vector-effect="non-scaling-stroke" attribute in the style.
Looks like in the past, someone tried to address this issue and actually made the situation worse by scaling the stroke width attribute in the XML directly when transform behavior was set to preserved. Basically a cludge fix. You can see this in action if you do a stroke to path. The vertical lines are bigger and the horizontal lines are actually smaller.
I’m relatively new to Inkscape and I’m having trouble with the borders for a shape. This changed a fewdays\weeks ago and I can’t figure out what caused it. I’m running Inkscape 1.2.2 (732a01da63, 2022-12-09) on a win 10 machine first installed a few years ago and haven’t updated it recently. I’ve been searching forums, google, youtube, etc and can’t find anything.
I have a basic box showing a 1mm border. The borders change if I increase the box's height or width using the sizing arrows or the scale option. When the box height is changed, the top and bottom bars increase without the width, and when the width of the box is changed, the sides increase.
My example shows three boxes that were all the same size (bottom right) when they started, and you can see the stretched results.
It doesn’t matter if the “When scaling objects, scale the stroke width by the same proportion” button on the top toolbar is clicked or not. This happens to other shapes, but not to the noticeable extent of a box.
Probably your rectangle is inside a group. Possibly it's the only shape in the group. Look at the shape description in the taskbar. When you scale a group, the line widths are scaled too. Two solutions: Ungroup the shape [Object > Ugroup] or [shift+ctrl+g]. Or open the group with the select tool [double-click] or [ctrl+enter] or [right-click > Enter group] and then scale the shape.
Note that a group can contain subgroups. Your rectangle might be more than one level down in the hierarchy.
There´s also a setting in the Inkscape Preferences->Behavior->Transforms->Store transformation: Optimized or Preserved. Check you have "Optimized" enabled.
It's a bug.
https://gitlab.com/inkscape/inbox/-/issues/10896
So it´s just a labelling error not a bug per se?
Nope - it is an actual SVG bug. Most likely been in for a long time. Inkscape doesn't use the SVG vector-effect="non-scaling-stroke" attribute. Not sure how they are going to be able to fix that easily.
I've never had a problem with it because the Preferences prevent me from encountering. But we still can´t be sure if this or the "Group-transform" is causing this here.
Correct - this only occurs when you set the transform behavior to preserved. If you set to optimized, you won't encounter this.
When set to optimized, Inkscape will appy calculations directly to the XML path data and the style width. When set to preserved, Inkscape lets the transform matrix handle the calculations and doesn't touch the actual XML path data and style. The problem comes in when you disable scaling the stroke width and have the behavior set to preserved. In this case, Inkscape should use "vector-effect="non-scaling-stroke" attribute in the style.
Looks like in the past, someone tried to address this issue and actually made the situation worse by scaling the stroke width attribute in the XML directly when transform behavior was set to preserved. Basically a cludge fix. You can see this in action if you do a stroke to path. The vertical lines are bigger and the horizontal lines are actually smaller.
Changing Preserved to Optimized worked!
Thanks everyone!