Inner/outer/center stroke placement

Bug #170401 reported by Bug Importer
26
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Inkscape
Invalid
Undecided
Unassigned

Bug Description

Currently, it appears that the stroke of an object is
centered on the object's edge, so that a 2 unit stroke
will increase the width of an object by two units --
half the stroke on the left, and half on the right.

It would be nice if you could specify that the stroke
was to appear inside or outside the object. This would
allow an object to be accurately sized (whether it's
inner or outer dimensions) and then have it's stroke
altered without affecting the overall dimensions.

It can be quite tricky to line objects up when you have
to take into account the width of the lines: the math
is always out by a couple of units here or there...

Thanks!

Tags: svg
Revision history for this message
Buliabyak-users (buliabyak-users) wrote :

It might be nice but SVG does not allow that so we cannot do
it. You can fake it by creating a separate "stroke" object
and moving it.

As for lining up, at least for grid snapping we have both
fill edge and stroke edge snapping to grid which gives you
some flexibility.

Revision history for this message
Bug Importer (bug-importer) wrote :

Here's an idea: when in 'inner-stroke' mode, if the user
increases the stroke width of a shape, the inner fill could
be reduced by a corresponding amount, maintaining the
overall external dimensions.

The svg file can continue to accurately describe the shape,
what's changing is the user interface. Inkscape performs
the tedious arithmatic for the user to keep shapes aligned
when their borders change.

Could this feature request be re-opened if the above seems
possible so that it doesn't get lost? Appreciate it.

Revision history for this message
Buliabyak-users (buliabyak-users) wrote :

Actually we have what you describe:

- create a stroke-only shape, no fill

- make a linked offset, inset it a bit inwards, paint it
with your fill color and no stroke

Voila, you have an inner fill which does not run into stroke
and which correctly updates when you move or node-edit the
stroke object. The only thing it doesn't do is react to the
changes in stroke width - you'll have to update the inset
distance manually.

Revision history for this message
Kwasi (mkii-deactivatedaccount) wrote :

Maybe a global setting can be provided to let users decide what kind of strokes they like to paint.
so Inkscape will automatically scale the object to simulate the desired behaviour when changing the objects width.

Example :
lets imagine the user likes to draw with inner strokes.
when the user draws a rectangle of 100x100 px without a stroke and then sets the stroke to be 5px, then Inkscape could scale the geometric object by -5px and move it by 2.5px in x and y and set the strokewidth to 5px.
The visual effect would be as desired and that would not break any specifications.

lets also asume someone else likes to draw outer strokes.
using the same example inkscape can scale by +5px and move it by -2.5 and then draw the 5px border.

It can be that simple. Someone just has to automate it.

su_v (suv-lp)
tags: added: svg
Revision history for this message
Mr.Gosh (mr-gosh) wrote :

is this still not possible - can't find any (non hand made) solution for this?!?

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.