Mid-markers missing on ends of sub-paths

Bug #456148 reported by Tavmjong Bah on 2009-10-20
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Johan Engelen

Bug Description

Continuation of bug 417597.

Inkscape does not draw the mid-markers on the ends of sub-paths as per the SVG spec. The spec states:

'marker-start' defines the arrowhead or polymarker that shall be drawn at the first vertex of the given 'path' element or basic shape. 'marker-end' defines the arrowhead or polymarker that shall be drawn at the final vertex. 'marker-mid' defines the arrowhead or polymarker that shall be drawn at every other vertex (i.e., every vertex except the first and last).

Mid-markers should be drawn on every vertex except the first and last of a 'path', thus mid-markers should be drawn on the ends of sub-paths except where the end corresponds to an end of a path. Firefox, Opera, and Batik all agree with this interpretation.

A test SVG file is attached. This test file should replace that submitted in bug 417597 (it covers both cases and it has been cleaned up).

Tavmjong Bah (tavmjong-free) wrote :
su_v (suv-lp) on 2009-10-20
tags: added: svg
su_v (suv-lp) wrote :

Confirmed with Inkscape 0.46+devel r22531+patch on OS X 10.5.8
(patch from bug #417597 applied to r22531)

Changed in inkscape:
status: New → Confirmed
Johan Engelen (johanengelen) wrote :

added the file to the render tests

Johan Engelen (johanengelen) wrote :

how should this path be rendered with start mid and end markers?
"M0,0 M100,0 M200,0 M300,0"
(a moveto-only path)

Changed in inkscape:
status: Confirmed → In Progress
Johan Engelen (johanengelen) wrote :

"M0,0 M100,0 M200,0 M300,0"
I'm coding it to render this as: start marker - mid marker - mid marker - end marker

Johan Engelen (johanengelen) wrote :

I hope the issue is resolved now with this patch.
(ignore the patch of bug 417597)

Changed in inkscape:
assignee: nobody → Johan Engelen (johanengelen)
su_v (suv-lp) wrote :

Patch tested and confirmed with Inkscape 0.46+devel r22540+patch456148 on OS X 10.5.8

su_v (suv-lp) wrote :

Minor issue: If mid marker and end marker overlap
- Inkscape r22540+patch draws mid marker on top
- Batik 1.7, Firefox 3.5.3 renders end marker on top of mid marker
- exported PDF draws end marker on top of mid marker

attaching modified test case from bug #452568 (Caveat: this SVG has a manually added 'viewBox' attribute… I was experimenting because the original drawing was to tiny when rendered in Firefox or Batik and not re-sizeable)

su_v (suv-lp) wrote :

Screenshot of Inkscape 0.46+devel r22552+patch on OS X 10.5.8 demonstrating the reverse stack order of mid and end markers.

ScislaC (scislac) wrote :

Patch committed in 22566, thanks Johan!
~suv, Please file a new bug for the rendering order issue.

Changed in inkscape:
importance: Undecided → Low
status: In Progress → Fix Released
su_v (suv-lp) wrote :

continued in new bug #478157 “Mid-markers are rendered above end-markers”:

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers