Zero-length subpaths can neither be imported nor drawn

Bug #689562 reported by fabb
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
New
Undecided
Unassigned

Bug Description

Inkscape does not allow to draw paths consisting of only one point at all. Also such a path will be cropped from an opened svg.

Zero-length subpaths make sense when stroke-linecap="round" (see spec below).

http://launchpadlibrarian.net/10577751/roundbug1.svg [1] should be rendered as two black circles. The right circle still isn't shown or loaded into Inkscape. It displays correctly in Firefox 4.0b7.

From the Spec of SVG 1.1 (http://www.w3.org/TR/SVG11/painting.html#StrokeProperties):
A subpath (see Paths) consisting of a single moveto shall not be stroked. Any zero length subpath shall not be stroked if the 'stroke-linecap’ property has a value of butt but shall be stroked if the ‘stroke-linecap’ property has a value of round or square, producing respectively a circle or a square centered at the given point. Examples of zero length subpaths include 'M 10,10 L 10,10', 'M 20,20 h 0', 'M 30,30 z' and 'M 40,40 c 0,0 0,0 0,0'.

And from the Implementation Notes in the Spec of SVG 1.1 (http://www.w3.org/TR/SVG11/implnote.html#PathElementImplementationNotes°):
If ‘stroke-linecap’ is set to butt and the given path segment has zero length, do not draw the linecap for that segment; however, do draw the linecap for zero-length path segments when ‘stroke-linecap’ is set to either round or square. (This allows round and square dots to be drawn on the canvas.)

[1] related reports (ATM closed as 'Fix released' and 'Invalid'):
Bug #166298 “zero-length subpaths with round linecaps are not rendered”
Bug #166306 “Closepaths are bad implemented”

Tags: svg
fabb (milkservice)
description: updated
su_v (suv-lp)
description: updated
Revision history for this message
su_v (suv-lp) wrote :

Differences in rendering of mentioned SVG file:

- none of the two paths:
Firefox 3.6, Opera 10.6

- left path only:
Inkscape 0 .48 and 0.48+devel r9950, Squiggle (Batik 1.7)

- both paths:
Safari 5.0

Of these SVG renderers, so far only Batik is one of Inkscape's reference SVG implementations:
<http://wiki.inkscape.org/wiki/index.php/FAQ#Inkscape_and_renderer_X_show_my_SVGs_differently._What_to_do.3F>

Revision history for this message
Beluga (buovjaga) wrote :

Still confirmed with http://launchpadlibrarian.net/10577751/roundbug1.svg

Arch Linux 64-bit, KDE Plasma 5
Inkscape 0.92pre1 15054 (GTK3)

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.