Need mode to preserve object position and total size when modifying stroke.

Asked by Edward J on 2017-01-07

I really like your wonderful and free Inkscape software but have found a problem.
When modifying the stroke of an object such as a rectangle, it always changes the object's position and size to preserve the position of the internal shape whilst increasing/decreasing the stroke size or shape. Whilst this can be useful to achieve the same effect as scaling a selection around the "rotation centre"; modifying the stroke shape in place, it is sometimes VERY annoying.
It would be useful to have an option (e.g. checkbox with label) in the stroke style editing area (Fill and Stroke) that enables this mode of editing where position and total size are preserved when the stroke geometry changes.
An example scenario is there's a background rectangle with 1 millimeter stroke on an A4 page (210mm x 297mm) which starts 5mm from the top and left and goes to 5mm from the bottom and right forming a page margin line. The user wants to increase the stroke width to 2 millimeters whilst retaining the margin gap (5mm from all edges) and the total width of the rectangle (the inner width should decrease to keep the total width the same with new border width). Currently they find that the x and y positions decrease and the inner size increases.
Please add this functionality in the next version to simplify simple resizing (make sure you add it as an edit option to toggle between the existing preserve inner shape mode and this "preserve position and total size" mode). Keep making Inkscape great!

Question information

Language:
English Edit question
Status:
Open
For:
Inkscape Edit question
Assignee:
No assignee Edit question
Last query:
2017-01-07
Last reply:
2017-01-07
TylerDurden (8thrule) said : #1

Sounds like you might want to stroke to the inside of the path...

Maybe you have seen this?...
https://answers.launchpad.net/inkscape/+question/79668

Hachmann (marenhachmann) said : #2

In the preferences, there's an option about using the geometrical bounding box or not. (Edit -> Preferences -> Tools)

You can make Inkscape just ignore the stroke if you select Geometric Bounding box instead of Visual Bounding Box.

Maren

Edward J (edwardj) said : #3

 To "TylerDurden (8thrule)":
That answer with ways to align stroke to the inside of a path is an interesting solution however it isn't in the specification and is slightly complicated. The issue creator mentions "it would be possible to juggle the width of identically sized boxes without having to modify the size of the box to ensure that the outside edges still aligns to the other boxes" when inset stroke is used, which is a phrase directly describing what my solution would do - the enabled option would increase/decrease box (inner) dimensions when the stroke size changes to preserve the previous total outer dimensions. My idea is simpler as a concept because it's all done by the software, barely to do with specifications and less complicated for the user.
Also the question post mentions another bug (#302044) "Size should optionally adjusted to match old bounding box when stroke changes" which seems to describe my proposed stroke edit mode more simply and states "Sometimes when you have several objects right next to another, a change in stroke's width in one of them will create a gap." but not much has been done there and the stroke alignment techniques are mentioned.
 To "Hachmann (marenhachmann)":
I've looked over that option of using geometric bounding boxes - it's useful and preserves position but doesn't do a crucial thing I want here which is preservation of total size including borders (stroke). If I have a 3x3 grid of identically sized boxes and I want to increase the stroke width of the middle box which is touching adjacent boxes without making it intersect with the other boxes, this geometric bounding mode won't work. It will keep the size and position but make the stroke overflow into the other boxes. I would want a mode that decreases the box's (inner) size enough to make the total size including stroke be the same as the other boxes (with no gaps between).

Edward J (edwardj) said : #4

Also TylerDurden (8thrule), some users might just want a normal stroke with no inset/outset but want to change the stroke size of their object whilst preserving position and total size (e.g. box surrounded by other boxes where there should be no overlap and the middle box needs a change in stroke size).

Hachmann (marenhachmann) said : #5

Mmh, I guess in that case we can only give you workarounds.

A) Use the button 'remove overlaps' in the align+distribute dialog, then resize the whole object grid until it matches again.

B) Or, if they're all the same, use clones, and only modify one item.

C) Or you could copy one of them, then add the stroke, then do Edit -> 'paste size / height /width separately' on the whole grid. (will only make sense if all are the same size, height or width, though).

Hachmann (marenhachmann) said : #6

(you'll need the visual bounding box for this, I think)

Can you help with this problem?

Provide an answer of your own, or ask Edward J for more information if necessary.

To post a message you must log in.