Closepaths are bad implemented

Bug #166306 reported by Piersvdt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Invalid
Undecided
Unassigned

Bug Description

A closepath where the start-coordinate is different
from the end-coordinate isn't possible (at least not in
the xml editor). It should be possible and there shoul
be a straight stroke between end and start.
The same for a subpath from only one coordinate (even
when followed by a closepath).

Closepaths are bad implemented, a not closed path with
the same start and end coordinate will also close, and
dashed lines never close.

Tags: svg
Revision history for this message
Piersvdt (piersvdt) wrote :

What's not possible with the xml-editor isn't loaded from
svg too, eg. paths from a single coordinate followed by a
closepath are not loaded, see attached file of bug #1120851

Revision history for this message
Buliabyak-users (buliabyak-users) wrote :

Attaching the test file here.

Inkscape rendering: One circle on the left.

Correct rendering: two circles.

Revision history for this message
Aaron C Spike (acspike) wrote :

I believe that Inkscape has implemented this properly. The
spec states that Moveto followed by Lineto to the same point
shoudl be stroked if stroke-linecap is round but moveto
followed by closepath should use the stroke-linejoin
property and thun not be stroked.

From the spec:
      A subpath (see Paths) consisting of a single
moveto is not stroked. A subpath consisting of a moveto
and lineto to the same exact location or a subpath
consisting of a moveto and a closepath will be stroked
only if the 'stroke-linecap' property is set to "round",
producing a circle centered at the given point.

Revision history for this message
fabb (milkservice) wrote :

The problem still persists.

The right circle still isn't shown or loaded into Inkscape. It displays correctly in Firefox 4.0b7.

Furthermore, Inkscape does not at all allow to draw paths consisting of only one point.

I do *not* think that Inkscape has implemented this correctly.

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.)

su_v (suv-lp)
tags: added: svg
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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