rotating line with arrow end doesn't rotate the arrow

Bug #452568 reported by JH
60
This bug affects 13 people
Affects Status Importance Assigned to Milestone
Inkscape
Confirmed
Undecided
Unassigned

Bug Description

rotating of a line with an arrow end by 90deg leads to a rotated line but the arrow is not rotated properly
found in 0.47.pre3 Mac

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

not reproduced with Inkscape 0.46+devel r22476 on OS X 10.5.8

can you attach a sample svg file which shows this bug?

tags: added: markers svg
Revision history for this message
ScislaC (scislac) wrote :

I can't reproduce either, I rotated using both the selector tool and node tool and it worked as expected.

Revision history for this message
JH (jandalin) wrote :

Here some more information. Please find enclosed two files
The first one is the original datafile which was originally created using Inkscape 0.46 (Ubuntu).
All arrows were fine, I highlighted two regions with arrows which are (after loading the same file with Inkscape 0.47pre3 on a Mac) still fine ( => 'OK') and somehow crippled (=> '??').
The second file is a screenshot of the exported file using Inkscape 0.47pre3 on a mac in the case the first file looks fine if you guys load it using Inkscape 0.46.
Hope this helps?

Revision history for this message
JH (jandalin) wrote :

screenshot, after loading the original data file using 0.47pre3 on a Mac

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

I can see the difference between 0.46-2 and Inkscape 0.47pre3-2. I'm just not sure which one is (strictly speaking) wrong ;-)
Firefox 3.5.3 renders it the same as Inkscape 0.47pre3, Batik 1.7 doesn't load it at all.

That vertical path has three nodes instead of two - remove e.g. the middle one and the arrowhead renders as expected with Inkscape 0.47pre3-2 on OS X 10.5.8. But I will search for changes and related bug reports regarding the rendering of markers since the release of 0.46.

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

There is a difference how the second and third node are read and displayed: Inkscape 0.46 renders them with identical coordinates whereas Inkscape 0.47pre renders them apart - resulting in the arrow head turn 90° sideways because the path segment between node 2 and 3 is rendered horizontal.

one of the paths in question:
    <path
       style="fill:none;stroke:#ff6600;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-end:url(#Arrow2SendvTST)"
       d="m 381.64015,567.49233 -0.21974,16.56195 0,0"
       id="path4859" />

The difference seems to be in the interpretation of "m 381.64015,567.49233 -0.21974,16.56195 0,0" i.e. the relative moveto (implicit lineto) '0,0' command (<http://www.w3.org/TR/SVG11/paths.html#PathDataMovetoCommands>)?

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

This could be caused by the changes mentioned in the releases notes 0.47:
«Inkscape is now able to handle paths with only 'movetos', i.e. "M 0,0 M 1,1 M 2,2". These kind of paths can be used to only show markers on a path without the rest of the path visible. »
<http://wiki.inkscape.org/wiki/index.php/Release_notes/0.47#Notable_bug_fixes>

see attached sample SVG file and the screenshots of its rendering in 0.46 and 0.46+devel r22516 on OS X 10.5.8.
The stock marker
    <marker
       inkscape:stockid="Arrow2Send"
       orient="auto" … />
has its orientation set to 'auto' - AFAIU this is the 'feature' that lets the arrowhead stay horizontal when rotating the path.

0.46+devel shows one bug though, but otherwise I think it's rendering of the markers is according to the SVG spec:
Bug #417597 “End and Start markers drawn on each sub-path”

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

I have worked on making marker rendering better in 0.47 using our svg testsuite. It is still not correct, but last time I checked the orientation of markers was correct. I'm willing to work on this, but I don't want to go through SVG specs again to try and figure out what is the correct way of rendering these things. If someone figures out what is right, please add a file and the correct pass reference png to the testsuite and point me to it. Thanks!

Revision history for this message
Thomas Holder (speleo3) wrote :

this is probably a "Won't Fix" :-(
A zero-length segment or a single point do not have an orientation, so the marker orientation is undetermined. The Inkscape 0.46 renderer was wrong, it disregarded zero-length segments and single points.

Revision history for this message
Peter Bardsley (p-bardsley) wrote :

I am running Vista and just downloaded Inkscape 4.7, which appears very well designed for scientific diagram/illustration purposes.

If I draw a line and add an arrow head, the arrow head always points horizontally left, not as I would expect in the direction that the line is pointing (horizontal, vertical, slanting).

Since the arrow head appears fixed in direction, I tried drawing a horizontal line, and then rotating. The arrow end does not rotate.

This makes the package useless for scientific purposes. That seems a shame.

I know that Vista is not the ideal platform but that is what is installed on my machine, and I am not a programmer.

Revision history for this message
Kyle Nitzsche (knitzsche) wrote :

Just a note to say that I am also using inkscape (ubuntu Karmic version 0.47), and the arrow heads do not point in the same direction as the line. This is a very serious limitation (one needs arrows...).

Revision history for this message
Johan Engelen (johanengelen) wrote :

I draw many lines with arrows and they always point in the direction of the line.
Please explain *exactly* what you have done. Try this:
1. select pen tool (shift+F6)
2. click once on canvas somewhere
3. click once somewhere else on canvas
4. press enter
5. ctrl+shift+F (stroke&fill dialog)
6. add arrow to start or end. Does it point in the right direction?
For me this always works.

Perhaps you have a double node at the end of the path, which results in the horizontal arrow?

Revision history for this message
Krzysztof Kosinski (tweenk) wrote :

This bug is caused by duplicate nodes at the end of the path. Bug 515237 is related.

How to fix the misbehaving arrows:
1. Select a misbehaving arrow in the node editor
2a. Select one of the duplicate nodes by clicking it and press Delete, OR
2b. Select both nodes at the end of the path and press the "Join nodes" toolbar button
3. Repeat for all misbehaving arrows

2b only works in the development version.

Revision history for this message
Mathematical Leopard (alisonat) wrote :

As a novice user of inkscape I was tearing my hair out because of this problem. The good news is that Krzysztof's fix above works perfectly. (I actually had to delete 3 duplicate nodes from the end of my arrow!) Many thanks for the clearly explained workaround.

Revision history for this message
Fabio Varesano (fabio-varesano) wrote :

Still present in Inkscape 0.48.1 r9760

Revision history for this message
Wolfgang Fahl (wf-bitplan) wrote :

Still present in 0.91

Revision history for this message
jazzynico (jazzynico) wrote :

Bug #515237 "Rotate shape adds node" seems to be fixed in 0.92.
Could you please try with 0.92.1 or 0.92 and confirm the arrow issue no longer affects the new Inkscape versions?

Thanks!

Revision history for this message
David Pinho (david-pinho) wrote :

Still present in Inkscape 0.92.3 (2405546, 2018-03-11) (Ubuntu 18.04) :-|

Workaround by Krzysztof Kosinski works great though!

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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