Can I preserve object size while changing stroke width?

Post questions on how to use or achieve an effect in Inkscape.
sssent
Posts: 1
Joined: Sat Aug 16, 2014 8:22 pm

Can I preserve object size while changing stroke width?

Postby sssent » Sat Aug 16, 2014 8:40 pm

Hi,
I need to fit my objects in fixed-size bounding boxes, so I set their offset and width accordingly. There's an option for preserving stroke width while I rescale them, but I need this behavior the other way around. That is, I'd like to set their fixed sized first, then play around with stroke width without changing their (visible, w/ stroke applied) size. Readjusting offset, width, and height works, but I'm just too lazy for that. Is there a way around this?

User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Re: Can I preserve object size while changing stroke width?

Postby druban » Sun Aug 17, 2014 7:16 am

I don't think this will work for you because it sounds as if you want the object to change size every time you adjust stroke width!! but there is an option in preferences to use 'visual' (with stroke) or 'geometric' (without stroke) bounding box (size). So basically depending on which option you pick the size displayed takes or doesn't take the stroke into account. But it won't automatically resize to keep it the same size.
Your mind is what you think it is.

User avatar
Grobe
Posts: 411
Joined: Tue Feb 02, 2010 2:20 am

Re: Can I preserve object size while changing stroke width?

Postby Grobe » Sun Aug 17, 2014 7:37 am

The only workaround I can think of is to use guides and use bounding boxes for your object.
So after you've scaled the stroke, you need to rescape the object - snapping to guides.
:lol:

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Can I preserve object size while changing stroke width?

Postby Lazur » Sun Aug 17, 2014 8:12 am

A bit different but might suit your needs: make two separate paths, one for the "stroke" and another one for the "fill" atop of it.
By fixing the lower object's size and giving it a desired stroke's colour -for a fill colour only, no stroke-,
you can add dynamic offsetting to the other path, and try out different "seemingly" strokes for "seemingly" identical shaped paths.

The only problem with it is that the stroke's heartline -path without stroke- is at the middle of the stroke,
so in this case the "seemingly identical" is technically not identical at all from that kind of perspective.
Just an idea.

User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Re: Can I preserve object size while changing stroke width?

Postby druban » Sun Aug 17, 2014 9:05 am

I should mention that the redoubtable Taumjong Bah (I believe ) is working on a stroke position feature that allows you to place the stroke inside, outside, or anywhere on the path so that would take care of this issue one it's in!
Your mind is what you think it is.

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Can I preserve object size while changing stroke width?

Postby Lazur » Sun Aug 17, 2014 9:50 pm

Interesting.

But.
Where the path bends, at the inner side of the curve, when the offsetting is larger than the tangent radius of the curve, it would produce unwanted results.
Which brings out that there would be a great need in at least to have an indication of the curvature along the path, or a way to limit the amount of offset according to the path's parametres.

User avatar
ianp5a
Posts: 106
Joined: Thu Sep 02, 2010 1:30 am

Re: Can I preserve object size while changing stroke width?

Postby ianp5a » Mon Aug 18, 2014 6:46 am

Another workaround is to "clip" the object with the same shape. Then you need to double the stroke of the clipped object as the outer half will always be hidden by the clip shape. But the outside always remains the same size.


Return to “Help with using Inkscape”