Connectors attached to an object not visible when object opacity less than 100%

Bug #716145 reported by Dorian Sabaz
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
New
Wishlist
Unassigned

Bug Description

I am running Inkscape 0.48, upon Ubuntu 10.04 LTS.

Here is the given scenario;

- Draw a rectangle with 100% opacity.
- Connect 1 or more connector to this rectangle, and toggle between either polyline or orthogonal layout for these connectors
- Now change the opacity of the rectangle to less than 100%, say 50%
- Connectors are still not visible.

Why is this an issue?

I understand that by not showing these connectors behind the object (ergo the above rectangle) is to simulate that these connectors may be attached to the object at its edge, instead of having the connectors actually attached to some object's edge. However, there are times when you do want to see these lines.

These connectors should be visible as the object's opacity is made less than 100%. Thus the visibility of the connectors should increase accordingly.

Furthermore, a cheeky way to make these connectors attach with one another (at this point in time, two connectors can not be joined), is to use an invisible rectangle that does the joining. This is another reason, for having the visibility of connectors to be respectively increased as the opacity of the top object is decreased.

In short, connectors are not following the proper behavior as expected when objects are overlayed upon them.

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

Could you attach a sample file illustrating your issue?

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

> (…) not showing these connectors behind the object

The connectors are not 'behind' the connected object - they are «drawn so they begin on the edge of the attached object.»
<http://tavmjong.free.fr/INKSCAPE/MANUAL_v16/html/Connectors-Creating.html>
The routing of the connector lines is calculated and the geometry of the resulting path is stored in the SVG source as regular path data (so that other SVG renderers show the same layout, without needing to know about the special parameters Inkscape assigns to connector lines). There is no part of those lines that is 'below' or 'hidden' by the opaque object the connector is attached to.

> These connectors should be visible as the object's opacity
> is made less than 100%. Thus the visibility of the connectors
> should increase accordingly.

As mentioned, there is nothing to be shown when the object is changed to be rendered with a reduced opacity (global, fill or stroke) - I'd even say most use cases of connectors depend on the current behavior (connectors don't overlap the connected shapes):
A typical diagram may be connecting groups which consist e.g. of a text object + a surrounding rectangle (unfilled, as frame): in your scenario, the connectors would have to be rendered inside the rectangle up to its midpoint, thus overlapping the text and making the diagram possibly unreadable).

Basic example e.g. as illustrated in the manual:
<http://tavmjong.free.fr/INKSCAPE/MANUAL_v16/html/Connectors.html>

Your "cheeky way to make these connectors attach with one another" (see feature request bug #259086 and bug #492644) could also be done with clones (at least as long as bug #474881 isn't fixed ;) ).

> This is another reason, for having the visibility of connectors
> to be respectively increased as the opacity of the top
> object is decreased.

IMHO the proper way to address this issue would be to implement one of these requested features:
Bug #168748 “Connectors with manual node edits should retain their shape”
Bug #259086 “connecting connectors to connectors (wish, in order to make constrained figures)”
Bug #492644 “support to noncontinuous connectors or improvement for split connectors”

Changed in inkscape:
importance: Undecided → Wishlist
Revision history for this message
Christian Lehmann (christian-lehmann) wrote :

Although this discussion is a bit old, let me add the following:

I confess I do not understand the comments in #2. As I understand Inkscape design, the start and end points of connectors are in the centers of the objects connected, but the part of their path covered by these objects is invisible. This can also be seen in the examples of http://tavmjong.free.fr/INKSCAPE/MANUAL/html/Connectors.html.
Thus, I do not understand the comment in #2:

> There is no part of those lines that is 'below' or 'hidden' by the opaque object the connector is attached to.

Now supposing that Inkspace should do would I described and what the help file displays, my problem is the following:
In a given diagram, some of the connectors that I draw behave as desired, while others overlap their connected object. I have inspected the SVG code; but with my limited understanding of SVG, I cannot discover the relevant difference between the specifications of these objects.

Maybe I can solve the problem manually by lowering the connectors to a lower layer. But then why are they created the wrong way in the first place?

I attach the file that shows the problem

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

@Christian Lehmann: AFAICT the relevant difference in your sample file is in whether the connected object (or one of its contained objects if it is a group) has a 'matrix()' transformation stored in the 'transform' attribute or not.

See e.g. comments #9 and #10 of bug #617810 which illustrate and describe one aspect of such a 'transform'-related issue.

Revision history for this message
Christian Lehmann (christian-lehmann) wrote : Re: [Bug 716145] Re: Connectors attached to an object not visible when object opacity less than 100%

Am 29.01.2013 10:37, schrieb ~suv:
> @Christian Lehmann: AFAICT the relevant difference in your sample file
> is in whether the connected object (or one of its contained objects if
> it is a group) has a 'matrix()' transformation stored in the 'transform'
> attribute or not.
>
> See e.g. comments #9 and #10 of bug #617810 which illustrate and
> describe one aspect of such a 'transform'-related issue.
>
Many thanks. And assuming that I just use the GUI instead of meddling
with the SVG code: how do I proceed in order to avoid that matrix
transformation?

Greetings, Christian

--
Prof. Dr. Christian Lehmann
Seminar für Sprachwissenschaft
Universität Erfurt
Postf. 900221
D - 99105 Erfurt

Tel.: +49/361/737-4201 (selbst)
         +49/361/737-4200 (Sekr.)
Fax: +49/361/737-4209

E-Post: <email address hidden>
http://www.christianlehmann.eu

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

> how do I proceed in order to avoid that matrix transformation?

Keep in mind what results in a 'matrix()' transformation: scaling, rotating, skewing, flipping etc. with the Select/Transform tool <F1> - on-canvas, with the buttons on the select tool controls bar, or with the dialog 'Object > Transform…'.
- These kind of transformations will be stored as preserved transformations (in the 'transform' attribute) when applied to object types like inkscape shapes, text, groups etc. Some exceptions are e.g. scaling a rectangle which is not rotated (this will only change its width / height), or proportionally scaling a text object (this adjusts the font size).
- Only regular paths can have these types of transformations always applied directly to the path data (aka geometry) - this behavior depends on the preference setting 'Transforms > Store transformation: [x] Optimized
- 'transform' attributes can be "inherited": ungrouping a group which has e.g. a 'matrix()' transformation applied will pass that transformation on to each of its former members.

Here are a few tips:

1) For new drawings:
In general: try to not scale objects - like groups or shapes, which are to be later connected with connectors - with the select tool (instead modify the objects' geometry with object-specific tools)
- groups: edit the geometry of the objects inside the group ('Ctrl+LMB' to select an object within a group, 'Ctrl+Enter' to enter a group [1]), or size them appropriately before grouping them.
- Inkscape shapes like ellipse/circle and polygons/stars will always use a preserved transform attribute e.g. when moved or scaled (even when scaled proportionally). To avoid that (or to get rid of it after resizing such a shape), convert the shapes to regular paths (menu 'Path > Object to Path'), and nudge them with the arrow keys (to optimize any inherited transforms): regular paths will have the transformation applied directly (aka "optimized" to the path geometry (with default preference settings for 'Transforms').

2) For existing objects:
1) ungroup transformed groups
2) convert the contained objects to path, nudge them with the arrow keys (to have the inherited transform attribute optimized into the path data)
3) I'm not sure about the text objects: they are not supposed to keep a 'transform' attribute when scaled unless the scaling is non-uniform (i.e. not proportional). If the scaling was non-proportional, you might have to delete its 'transform' attribute manually in the XML Editor, then reposition the text and adjust its font-size. Else you might consider recreating the text object - whatever is faster to achieve.
4) regroup
5) reattach the connectors to the newly created groups

-----
[1] <http://tavmjong.free.fr/INKSCAPE/MANUAL/html/Groups.html>

Revision history for this message
Christian Lehmann (christian-lehmann) wrote :

Thank you 1000 times; that is really helpful; should probably go into
the Inkscape help.
Best, Christian

PS. Incidentally, I would have more reports and suggestions for
development; but with other programs, it is mainly a waste of time,
since developers have their own mind and goals. If you encourage me to
submit them, I will do so.

--
Prof. Dr. Christian Lehmann
Seminar für Sprachwissenschaft
Universität Erfurt
Postf. 900221
D - 99105 Erfurt

Tel.: +49/361/737-4201 (selbst)
         +49/361/737-4200 (Sekr.)
Fax: +49/361/737-4209

E-Post: <email address hidden>
http://www.christianlehmann.eu

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.