J.B.C.Engelen wrote, On 01/03/09 19:56:
yes, markers should be clipped by their viewBox, but inkscape does not do that.
this test file reveals another issue with markers: The bounding box is to big, it looks like it gets calculated for orient="auto" even though these examples all use the default orient="0".
Could you tell me exactly what the problem is? Perhaps create a test file for me? I've worked on markers before so I might be able to fix it, but I forgot what the orient attribute exactly means.
from http://www.w3.org/TR/SVG/painting.html#MarkerElement
orient = "auto | <angle>" Indicates how the marker is rotated.
The default value is an angle of 0 degrees, this means no rotation. A value of "auto" rotates the marker so that it's x-axis matches the bisecting line between incoming and outgoing path segment. I attached a test file, the guidelines match the bounding box of the two paths. For the path with the blue marker this is correct, for the path with the red marker this is not correct as you can see. However, it's only the boundig box, rendering is fine.
The other issue is a rendering problem. The marker must be clipped by its viewBox, unless overflow="visible" is given.
"... the default behavior of SVG user agents is to establish a clipping path to the bounds of the initial viewport and to establish a new clipping path for each element which establishes a new viewport and each 'pattern' and 'marker' element."
"The initial value for 'overflow' as defined in [CSS2-overflow] is 'visible'; however, SVG's user agent style sheet overrides this initial value and set the 'overflow' property on elements that establish new viewports (e.g., 'svg' elements), 'pattern' elements and 'marker' elements to the value 'hidden'."
from http://www.w3.org/TR/SVG/masking.html#InitialClippingPath
Thomas