Issue 123410 - [SVG] marker rotation wrong on line close line sequence in d attribute in path element
Summary: [SVG] marker rotation wrong on line close line sequence in d attribute in pat...
Status: UNCONFIRMED
Alias: None
Product: Draw
Classification: Application
Component: open-import (show other issues)
Version: 4.1.0-dev
Hardware: All All
: P3 Normal (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL: http://www.w3.org/TR/SVG/painting.htm...
Keywords:
Depends on: 119118
Blocks:
  Show dependency tree
 
Reported: 2013-10-02 13:56 UTC by Regina Henschel
Modified: 2017-05-20 10:45 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Example with close command followed by line command (19.61 KB, application/zip)
2013-10-02 13:56 UTC, Regina Henschel
no flags Details
Testfile with command sequence lzl and with lzml to compare (28.68 KB, application/zip)
2013-10-30 10:34 UTC, Regina Henschel
no flags Details
Testfile with command sequence lzl and with lzml to compare (26.10 KB, application/zip)
2013-11-03 14:01 UTC, Regina Henschel
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Regina Henschel 2013-10-02 13:56:55 UTC
Created attachment 81692 [details]
Example with close command followed by line command

If there is no moveto but another command immediately after a z command, then the spec defines a special calculation for the marker rotation:

"When a 'closepath' command is followed by a command other than a 'moveto' command, then the orientation of the marker corresponding to the 'closepath' command is calculated assuming that:
    the path segment going into the vertex is the path segment corresponding to the closepath
    the path segment coming out of the vertex is the first path segment of the subsequent subpath."

The current implementation of get_markerRotation cannot handle this, because it only knows the polygon, to which the vertex belongs, but not the next polygon.

Because of the still missing fix for bug 119118, testing is yet not possible. You will see a completely wrong rendering. The attachment contains the svg.graphic and a picture how it is rendered in IE 10, and a document with both linked.

Armin, I have put you in CC, because this cannot be fixed by simple changes inside a method, but a design change might be needed. Is the information, whether a subpath was started with a moveto command still available in method SvgStyleAttributes::add_markers?
Comment 1 Regina Henschel 2013-10-30 10:34:20 UTC
Created attachment 81841 [details]
Testfile with command sequence lzl and with lzml to compare

With r1536830 the line starts at the correct position. But it looks still not correct. It looks like there is an additional moveto command.
Comment 2 Regina Henschel 2013-11-03 14:01:31 UTC
Created attachment 81869 [details]
Testfile with command sequence lzl and with lzml to compare

I have set the opacity of the red marker-mid to 0.5. Now it is possible to see, whether two red markers are drawn on top of each other. This allows to count the markers drawn by browsers
Comment 3 Marcus 2017-05-20 10:45:33 UTC
Reset the assignee to the default "issues@openoffice.apache.org".