Comment 1 for bug 168651

Revision history for this message
Peter Moulder (pjrm) wrote : Re: 'fit page to selection' affecting tranf. centers

Originator: NO

Given a choice between just a textual description of how to reproduce and
what the expected vs actual behaviour is, or just a video, I'd actually
prefer just the textual description. Indeed, I didn't manage to reproduce
exactly the behaviour shown in the video. (The video didn't show what
clone tiling settings were in use, and didn't start with launching inkscape
with ~/.inkscape moved out of the way.)

Here is a textual description of something similar that I have
reproduced:
Start inkscape.
Draw a rectangle.
Edit>Clone>Create Tiled Clones...
Set Rows, Columns to (say) 6, 1.
Choose the Rotation tab and set Per row to 15°.
Click the Create button.
Note that the resulting clones' centres all lie on a vertical line.

Undo.
Ctrl+Shift+D (Document Properties)
Click Fit page to selection.
Click the Create button (on the Create Tiled Clones dialog) again.
Note that this time the resulting clones' centres do not all lie on one
vertical line.

The same occurs (i.e. not aligned to a vertical line) if, instead of Undo,
I exit inkscape, rm -rf ~/.inkscape, start Inkscape, draw a rectangle,
Ctrl+Shift+D and Fit page to selection, Edit>Clone>Create Tiled Clones and
so on.

If I start Inkscape, create a rectangle, save, Fit page to selection, save
as a different file, exit, and try the same clone tiles operation on each
(exiting and rm -rf ~/.inkscape between the two), then again the normal one
is vertical and the file whose canvas was fit to selection is non-vertical:
so the behaviour can be reproduced from loaded files rather than requiring
memory state.

Doing a diff between the two input files, the main difference is that the
fitted one's "Layer 1" group has a
transform="translate(-162.35715,-174.71933)" attribute.

So I think the first question is what transformation clonetiler_apply
should apply when the selection is in an affine-transformed group/layer.
I'll assign to buliabyak (main author of Clone Tiling and
dialogs/clonetiler.cpp) to decide on that one.

A second question is how Fit canvas to selection should implement its
translation step, whether adding a transform attribute to the group as it
does now or whether to go more deeply. If the latter, then how deeply? If
fully deeply, then beware of issues with objects in a group being cloned
(especially if that group has a rotation transformation): need to be
careful about how to adjust the clone's transform.

I've assigned this a relatively low Priority for the moment, though I
don't object to increasing it to as much as 6.