Comment 12 for bug 174046

Revision history for this message
Diederik van Lierop (mail-diedenrezi) wrote : Re: [Bug 174046] Re: Rectangles do not snap accurately to grid

Hi Bulia,

Op Ma, 10 maart, 2008 11:25, schreef bbyak:
> Diederik: I reviewed your SVG and I honestly don't see a problem to
> solve here. If I want the nodes to snap, I naturally would use geometric
> bbox; if I use visual bbox I'm not interested in nodes snapping (at
> least not while scaling). Both these alternatives are consistent and
> already work (or at least they should).

You're right about that. If you do it like that then there is no problem.
But currently it is possible to do it differently, and because it's the
default to use visual bboxes, users probably will.

> Your analysis however assumes
> that someone mixes these two modes - and he will get mixed results,
> quite naturally, but I don't think we should add some complex on-the-fly
> switching to work around this. It's much easier to just use consistent
> bbox/snapping settings. Am I missing something?

First I must admit that I haven't though very long about that option yet.
But consider this: if we disable snapping of nodes when the default visual
bbox is used (which is default), then by default we will only be able to
snap the bbox corners and not the e.g. path nodes, text base-lines,
rotation center, corners of stars or rotated rectangles, etc. It's really
only the bbox corners that will snap in such a case.

Of course the issue I explained in the svg file only holds for the
selector tool, and even more specifically only for scaling and stretching
modes because these transformations need an origin. So we could disable
the node snapping for the scaling and stretching, so we can keep it
enabled for the translations and skewing. Wouldn't that limit us too much
though, even if its only for the scaling/stretching? For example, when
stretching a circle it would not be possible to snap the center. I think I
would miss such a feature at some point, but there should be more
convincing examples. I'm not that good at thinking of many different use
cases, probably because I've spend more time on programming than on using
Inkscape ;-)

Diederik