Advertisement


Is it possible for Inkscape to snap to a path's border instead of the path?


Question

For example, if I've got a path with a 3px border, I'd like it to snap to the edge of the border and not to the path its self?

Here's a square which has the path snap to the guides instead of the square's border:

sad snapping

2014/01/28
1
3
1/28/2014 12:03:00 AM

Accepted Answer

The nodes of a path will always be centered with respect to the stroke (unless when dealing with live path effects or the powerstroke, but that's a different subject)

You might still be able to achieve what you want, but only when dealing with bounding boxes. For this, go to Preferences -> Tools and set the bounding box to visual (as opposed to geometric). You can now transform the object or selection such that "true" corner will snap to the grid.

Should you be trying to make crisp bitmaps, then you might want to have a look at the pixelsnap extension, see here.

2014/02/10
5
2/10/2014 9:43:00 PM

You can make a copy of the path, then convert the copy's border to a path by using the "Sroke to Path" command.

The edge of the border has now its own node that you can snap to.

Finally you can delete the copy and are left with the original path and the objects snapped to its outline. This way you can still use the geometric bounding box.

2016/07/04