Comment 7 for bug 1036884

Revision history for this message
su_v (suv-lp) wrote :

> Does it ever make sense for "fill" to be set on a 1D object?
> I don't think so, and the code should probably not allow it.

This "1D object" (a regular <path> if created with Inkscape's tools) can be edited and gain a second dimension anytime…

Instead of adding workarounds and constraints in various places, here's another thought to consider:
The SVG 1.1 specification defines several types of "lines": <line>, <polyline>, <polygon> and <path> [1]. Inkscape supports all for rendering, but only edits and writes <path>.

For 'path' elements, it makes no sense to restrict the styling properties (no fill allowed under certain circumstances, which might change anytime the object is edited). The actual request seems to be to add (optional) full support for all basic SVG shapes [2] to Inkscape (currently, this is limited to <rect>), including any constrains as defined in the SVG spec (e.g. for <line> to have no fill [2]).
Using 'path' elements though is more versatile (e.g. because it supports SVG features like 'text-on-path', which shape elements do not), which is AFAIK the main reason why even the parameterized Inkscape shapes like circle/ellipse and star/polygon are defined as SVG <path> types in the SVG source.

---
[1] <http://www.w3.org/TR/SVG11/shapes.html>
[2] e.g. Bug #170934, Bug #377982
[3] «9.5 The ‘line’ element

The ‘line’ element defines a line segment that starts at one point and ends at another.
(…)
Because ‘line’ elements are single lines and thus are geometrically one-dimensional, they have no interior; thus, ‘line’ elements are never filled (see the ‘fill’ property).»
<http://www.w3.org/TR/SVG11/shapes.html#LineElement>