Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arrowheads on dashed lines are rendered wrong by Safari #69

Closed
dtolnay opened this issue Dec 6, 2020 · 2 comments
Closed

Arrowheads on dashed lines are rendered wrong by Safari #69

dtolnay opened this issue Dec 6, 2020 · 2 comments

Comments

@dtolnay
Copy link
Contributor

dtolnay commented Dec 6, 2020

As of current master:

$ cargo build
$ echo ' <~~~~~~~~~~~~~~>' | target/debug/svgbob > test.svg

It looks okay in Chrome and Firefox, but Safari does this:

Screen Shot 2020-12-06 at 12 27 40 PM

It would be good to avoid marker-start/marker-end and instead use a polygon class="filled" to position and draw the arrowheads.

@ivanceras
Copy link
Owner

Initially, I wanted the start-marker and end-marker since it creates a coherent drawing element in a sense that if you further enhance the resulting svg in an svg editor such as inkscape, the user can freely manipulate the lines, such as rotating the lines, dragging one of the endpoints. Rendering these arrow heads as polygon may simplify the algorithms in the code, but also losses the nice features of creating a more coherent output.

Might be a good alternative to do it, to keep a consistent look across browsers. This could also be implemented as a flag in the Settings.

@ivanceras
Copy link
Owner

This commit adds a parameter in the Settings to specify whether or not Arrow heads will merge with lines. The default value is false, hence the arrow heads will be rendered as polygons instead of a marker to a line. A published version 0.5.0 of the crate have this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants