SVG-Edit / svgedit

Powerful SVG-Editor for your browser
MIT License
6.6k stars 1.54k forks source link

url for markers #10

Closed jlpoolen closed 6 years ago

jlpoolen commented 9 years ago

line_arrow_sample = line_arrow_sample2

Markers, say an arrowhead and star for a line, are referenced by some soft of function. Here is a sample code:

<line marker-end="url(#se_marker_end_svg_1)" 
marker-start="url(#se_marker_start_svg_1)" 
id="svg_1" y2="66.08334" x2="181.08334" 
y1="48.08334" x1="43.08334"
 stroke-width="5" stroke="#000000" fill="none"/>

I've found that I can take the SVG I created in SVG-Edit and copy it to a wiki page in fossil (http://fossil-scm.org/index.html/doc/trunk/www/index.wiki) and the SVG will display, for the most part. What happens is that the convention of identifying the marker with the attribute marker-end or marker-start having a value of url(#se_marker_end_svg_1) does not resolve correctly.

This occurs in version 2.5.1. (I cannot get trunk to fully display when imported into fossil and therefore cannot say with certainty if the url() function within an attribute value is still used; I'm presuming it is.)

I have not been able to determine where "url()" is defined to see if there might be an option to place a fully qualified path rather than using a resolve-at-runtime function.

Is it possible to have an alternative which does not utilize the url() function in attribute values?

jlpoolen commented 9 years ago

I should share with you how I'm using it by providing a screen shot of a Ticket in the Fossil system... I simply paste the SVG created in SVG-Edit into the wiki edit field of the Ticket system and now I can have marked-up images to illustrate problems with the music scanner code.

2015-08-01 06_33_09-libreveris_ view ticket

codedread commented 8 years ago

The url() syntax is defined here: http://www.w3.org/TR/SVG11/types.html#DataTypeFuncIRI and it is valid SVG. The marker element is defined here: http://www.w3.org/TR/SVG11/painting.html#MarkerElement

I don't know what "Fossil" is, but I think you are saying this is a limitation in the Fossil software, is that correct?

jlpoolen commented 8 years ago

Thank you, that is helpful. I'll need some time, e.g. weeks, to study and assess and will update with my findings.

brettz9 commented 6 years ago

Closing for lack of activity but feel free to reopen/comment further if you have additional information.