Snapping: Keeping borders inside gridlines

Post questions on how to use or achieve an effect in Inkscape.
vongoh
Posts: 8
Joined: Sun Oct 27, 2013 3:10 am

Snapping: Keeping borders inside gridlines

Postby vongoh » Sat Dec 07, 2013 12:28 am

Hi, I'm having some trouble with something basic and wondering if someone out there can shoot me the answer:

When creating an object on the grid with snapping enabled, this causes the edge or corners of the bounding box to snap to the gridline(s). However if the object has a border, by default Inkscape seems to always want to snap to the middle of the border.

In other words - what we have after snapping an object with a 1px border to a gridline, is an object with a border that is 0.5px inside the grid, and 0.5px outside the grid. The border is straddling the grid.

What is the magic button or preferences setting that will get our objects so that the outer edge of the border is snuggly inside the gridline with the rest of the object?

tylerdurden
Posts: 2344
Joined: Sun Apr 14, 2013 12:04 pm
Location: Michigan, USA

Re: Snapping: Keeping borders inside gridlines

Postby tylerdurden » Sat Dec 07, 2013 1:08 am

Ensure that snapping to nodes is turned off, and bounding box snapping should deliver the desired result.

http://tavmjong.free.fr/INKSCAPE/MANUAL ... ng-Objects

Regards,
TD
Have a nice day.

I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1

The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/

tylerdurden
Posts: 2344
Joined: Sun Apr 14, 2013 12:04 pm
Location: Michigan, USA

Re: Snapping: Keeping borders inside gridlines

Postby tylerdurden » Sat Dec 07, 2013 1:14 am

Caveat:

"Note
The visual bounding box is determined by assuming that the Join style is Round."

http://tavmjong.free.fr/INKSCAPE/MANUAL ... Stroke-Cap
Have a nice day.

I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1

The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/

vongoh
Posts: 8
Joined: Sun Oct 27, 2013 3:10 am

Re: Snapping: Keeping borders inside gridlines

Postby vongoh » Sat Dec 07, 2013 7:55 am

tylerdurden wrote:Ensure that snapping to nodes is turned off, and bounding box snapping should deliver the desired result.

http://tavmjong.free.fr/INKSCAPE/MANUAL ... ng-Objects

Regards,
TD


Thanks. Tried this and still get the same result.

- Global snapping is on
- Snap bounding box corners is on.
- Join is set to Round in Stroke Style
- All snapping to Nodes are disabled

The border still straddles the line of the grid.

Image

A manual I've been using ("Inkscape 0.48 Essentials for Web Designers) actually mentions this issue, took the effort to include
a figure illustrating this, but completely omits how to actually do it! Hence why I am posting. Here's a screenshot from the book:

Image

On a related note - the only way I can seem to get snapping to work at all in this program is "Snap to bounding box corners". All the other settings
I've tried I cant seem to get to work at all. "Snap to bounding box corners" with the stroke straddling halfway over a grid line is the best I can make
it do so far.

I'm switching over from using Fireworks for years. Adobes pricing model is ridiculous now, + they've stopped supporting it altogther apparently. So I am
working hard at this to try and make it work but a few of these niggling issues are holding me back .. please tell me I'm missing sthing obvious!

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

Re: Snapping: Keeping borders inside gridlines

Postby Lazur » Sat Dec 07, 2013 8:33 am

Hi.

Are you after a way to draw pixel fitted imagery?

With your stoke widths not being even pixels, the inner edge of the lines would fall off the grid.
Thus even if the object's bounding box is at the grid lines, if you export to png at 90 dpi the stroke would get anti-aliased and look blurred.
By setting the line width to 1 px it wouldn't matter much if all the nodes are snapping, or the bounding box -if right exporting area is set-.

dvlierop
Posts: 139
Joined: Sat Sep 08, 2007 4:25 am

Re: Snapping: Keeping borders inside gridlines

Postby dvlierop » Sun Dec 08, 2013 4:34 am

Hi vongoh,

Please check if in the preferences the bounding box has been set to "visual bounding box"; Ctrl-Shift-P -> Tools -> Visual bounding box

vongoh
Posts: 8
Joined: Sun Oct 27, 2013 3:10 am

Re: Snapping: Keeping borders inside gridlines

Postby vongoh » Mon Dec 09, 2013 5:09 am

dvlierop wrote:Hi vongoh,

Please check if in the preferences the bounding box has been set to "visual bounding box"; Ctrl-Shift-P -> Tools -> Visual bounding box


Yes! :) That did the trick.

Essentially what I was looking for is the graphics editor version of CSS3

Code: Select all

box-sizing: border box;
declaration - keeping the border width
inside the overall calculation of object size.

Thanks!


Return to “Help with using Inkscape”