Connector markers alignment to group depends on orientation (should be invariant)

Bug #617810 reported by Rita Bylsma
38
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Inkscape
Invalid
Medium
Unassigned

Bug Description

Steps to reproduce:
- I created a group consisting of a single object, an ellipse.
- I connected that group
- I added a marker I designed before.
- When I move the group, the marker is sometimes completely under the group,
  sometimes completely outside of the group, sometimes halfway. Halfway was intended.

Context:
Inkscape version= 0.47 r22583 (Jul 3 2010)
uname -as=Linux **** 2.6.34-ARCH #1 SMP PREEMPT Tue Aug 10 21:38:22 CEST 2010 i686 **** GNU/Linux

Changes from previous behavior:
- In the previous version for which I made the marker, the alignment of the marker to the group was invariant:
  the center of mass of the marker would always be on the bounding box of the group. Now it is not.
  Sorry, I do not know which was that previous version.

Related observations:
- Previously, when connecting to an object, the center of mass of the marker would be aligned to the outside rim of the object. Now the center of mass of the marker is aligned to the centerline of the stroke of the object. This is probably a better choice, but groups have an outer rim, but no outer stroke, so maybe the mentioned bug is related to this change.

Related bugs:
- This bug is related to bug #488338, but the problem here is not that the bounding box of only one of the objects in the group is used. In my test, there is only one object in the group and still there is trouble.

Revision history for this message
Rita Bylsma (r-bylsma) wrote :
su_v (suv-lp)
tags: added: connectors groups markers
removed: connector group marker
Revision history for this message
su_v (suv-lp) wrote : Re: [Bug 617810] Re: Connector markers alignment to group depends on orientation (should be invariant)

not quite reproduced:

Inkscape 0.46, 0.47 and 0.48+devel render the markers of the connectors
all the same.

Squiggle (Batik 1.7) [1] however renders it differently.

[1] for Batik I removed all empty 'FlowText' objects, and also deleted
all regular text objects without content. Otherwise the file was unchanged.

Revision history for this message
Rita Bylsma (r-bylsma) wrote :

Are you saying that the behavior is (except for Squiggle) as intended?
All your other files show the same as what I saw and to me it makes the connector function useless for groups.
Furthermore, it had been correct, i.e. as I expect from a connector function. I will try to find out when that was. It was not only an older version, it was also under Gnome in Ubuntu and now under wmii in Arch. Sorry, I had not realized that. I will test under Gnome in Ubuntu.

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

> Are you saying that the behavior is (except for Squiggle) as
> intended?

No - Batik is one of Inkscape's reference SVG renderer [1], it helps for bug triage to compare an SVG rendering issue like markers to Batik.

About the Inkscape screenshots: they cover the most recent versions (including the just released 0.48), and I attached them for clues what version you refer to (which might help with bug triage to track down what had changed when and why).

[1] http://wiki.inkscape.org/wiki/index.php/FAQ#Inkscape_and_renderer_X_show_my_SVGs_differently._What_to_do.3F

Revision history for this message
Rita Bylsma (r-bylsma) wrote :

Under Gnome in Ubuntu, with inkscape version 0.46, 8 April 2009, the behavior is OK. See the attached files.

Note that the error does not occur during rendering, but during attachment of the connector or movement of the group.
So my previously attached file shows the wrong result of me moving the groups around.

The now attached files show the correct result of me moving the groups around.

The attachment to the object, the circle in the middle, is also different, and in that case, the new behavior is much better.

Revision history for this message
Rita Bylsma (r-bylsma) wrote :
Revision history for this message
Rita Bylsma (r-bylsma) wrote :

In the diff on the wrong and correct svg I see:

Lines like:
< style="fill:#000000;fill-opacity:0;fill-rule:evenodd;stroke:#999999;s...
> style="fill:#000000;fill-opacity:0;fill-rule:evenodd;stroke:#999999;s...
But this is only due to different sorting order of the properties, I checked (by putting all on separate lines and another diff).

< inkscape:connection-start="
> ,,

and two path blocks.
Also only different order

Real differences:
< d="M 803.67287,320.23984 L 674.69598,270.34486"
> d="M 791.76336,319.40572 664.15247,266.76197"

< transform="translate(-45.305654,-70.964057)">
> transform="translate(-70.469031,-68.168126)">

Sorry I left the FlowText objects and such in. I had not understood what you meant. I was not aware that there was some invisible rubbish in the file (and one visible, but far outside of viewport).

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

The error in Inkscape 0.47 seems to be in incorrectly handling nested preserved transformations (the group as well as its child each have an explicit 'transform' attribute). Once I converted the child of each group to a path and forced Inkscape to rewrite its path data (the transformation is now 'optimized' and stored in the node coordinates), the connectors in 0.47 behave like in 0.46 when moving a group with an attached connector (see attached file to test in 0.47).

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

reproduced with Inkscape 0.47, 0.48 and 0.48+devel r9713 on OS X 10.5.8

Changed in inkscape:
importance: Undecided → Medium
status: New → Confirmed
tags: added: transformations
removed: markers
Revision history for this message
su_v (suv-lp) wrote :
Revision history for this message
su_v (suv-lp) wrote :

Explanation to previously attached illustration:

A preserved 'transform' attribute of the lowest object (in z-order) within a transformed group seems to cause the connector endpoint to be wrongly calculated. The preserved 'transform' attribute occurs with e.g. scaled, rotated, skewed or flipped Inkscape shapes like ellipses, stars/polygons, spirals and transformed objects which have a filter effect applied.

related report (fixed in 0.48):
Bug #488338 “Diagram connectors markers misplaced when connecting to grouped objects (uses wrong bounding box)”
<https://bugs.launchpad.net/inkscape/+bug/488338>

Revision history for this message
Beluga (buovjaga) wrote :

Tried to repro from scratch with group flipped horizontally. I see the connector sometimes going over the group when moving the group.

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

Revision history for this message
Jonathan Hofinger (jhofinger) wrote :

Hi - thanks for reporting this bug, I've manually migrated it to Inkscape's new bug tracker on GitLab, and closed it here.

Please feel free to file new bugs about the issues you're seeing at http://inkscape.org/report.

Moved to: https://gitlab.com/inkscape/inbox/issues/1981
Closed by: https://gitlab.com/jhofinger

Changed in inkscape:
status: Confirmed → Invalid
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.