Grid extension incorrectly handles transforms of parent group

Bug #892694 reported by su_v
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Triaged
Medium
Unassigned

Bug Description

Follow-up report to comment #14 in bug #401567:
<https://bugs.launchpad.net/inkscape/+bug/401567/comments/14>

'Extensions > Render > Grid…' does not properly handle transforms on parent groups (or layers).

Steps to reproduce:
1) open new default (A4 portrait) document
2) change page orientation to landscape
3) draw a rectangle
4) select the rectangle and apply 'Extensions > Render > Grid'

Expected result:
The grid is placed inside the bounding box of the selected rectangle.

Actual result:
In this example, the grid is offset vertically by the amount of the vertical 'translate()' transformation added to the top-level layer (relative to the SVG origin/coordinate system).

Also affects grids inserted/created inside transformed (e.g. scaled and/or rotated) groups.

Reproduced with Inkscape 0.48.2 and 0.48+devel r10744 on Mac OS X 10.5.8 (i386).

Revision history for this message
Alvin Penner (apenner) wrote :

confirmed on Windows XP, Inkscape build 10728.
although in my case the problem occurs only when the transform is on the top level layer, as would be caused by a page size change. If I have a translate operation on a subgroup as in the attached figure, then the grid appears to be correct.

Changed in inkscape:
status: New → Confirmed
Revision history for this message
su_v (suv-lp) wrote :

> If I have a translate operation on a subgroup as in the attached
> figure, then the grid appears to be correct.>

I think your example shows a second bug (selecting a shape with a preserved transform). IMHO the position of both grids in your example is wrong: it should be placed on top of the bbox of the ellipse.

Attaching an example with simple rectangles inside a group.

(report was filed based on a recent discussion in the InkscapeForum:
<http://www.inkscapeforum.com/viewtopic.php?f=5&t=10703>)

Revision history for this message
su_v (suv-lp) wrote :

> your example shows a second bug (selecting a shape with a preserved transform)

hmm, maybe not - how did you create the grid outside of the group? By 'Ctrl-selecting' the ellipse inside the transformed group instead of actually entering the group?

Revision history for this message
su_v (suv-lp) wrote :

Nevermind - I misread the file attached in comment #1-

As originally reported:
> affects grids inserted/created inside transformed (e.g. scaled and/or rotated) groups.

The difference is that you didn't enter the group - if selecting an object within a group without actually entering the group, the grid is placed correctly. But as with layers, the bug exposes itself if you first enter the group [1] so that it gets the current drawing level, and then apply the extension.

[1] using the context menu entry, or by double-clicking it or by typing the keyboard shortcut 'Ctrl+Enter'

Revision history for this message
Alvin Penner (apenner) wrote :

yes, I see what you mean. I duplicated the problem by double-clicking to get into the group, thanks for the tip. Previously I had selected the box using the XML editor.

jazzynico (jazzynico)
Changed in inkscape:
importance: Undecided → Medium
status: Confirmed → Triaged
Revision history for this message
Beluga (buovjaga) wrote :

Still repro.

Arch Linux 64-bit, KDE Plasma 5
Inkscape 0.92pre1 15073 (GTK3)

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.