
On Thu, 17 Mar 2005 09:59:15 -0800 (PST), John Cliff <simarilius@...36...> wrote:
What I'd hoped to do was make the default markers styleless, then to xlink:href them from defs with a style applied (ala gradients and the vectors), as they should be able to inherit then (or can they? that was how i read it anyhow) Problem is we dont support xlinked markers atm. and I didnt know where to start adding support for it.
Markers cannot href each other. So you'll have to simply duplicate a marker when applying style to its user path (only if the hrefcount of the marker is > 1, otherwise it's not needed). However the copied marker should carry some extrension attr indicating that it's a styled copy of another marker, for purposes of showing in the list only the markers which differ by contents, not style.
btw, other complication is that some markers are solid filled paths, while others are just stroked, so you have to work out where to apply the style. What you do if the marker refs a gradient I dont know :)
I think it's possible to redraw all the basic markers (arrows, squares, etc) so that they look the same but only use stroke, no fill. This will simplify things a lot, as you'll just copy the new path style to marker and that will paint it the needed color. More elaborate markers will use fill too, in which case their fill color will be determined by that of the user path. Note that per SVG spec, unset stroke is invisible (unlike unset fill which is black), so in the original markers you will need to provide stroke:black on <marker>, and replace it with whatever is the user path's new style.