<rect> zero radius handling not conformant
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
Invalid
|
Medium
|
Unassigned |
Bug Description
Inkscape does not handle a <rect> element with one radius attribute (rx or ry) explicitly zero and the other non-zero according to the spec. Instead it behaves as though both radii are set to the non-zero value.
The SVG spec says that if a properly specified value is not supplied for one radius, both radii are set to the other value. Inkscape appears to be applying that here, but I believe this is incorrect as 0 is a properly specified value. If any radius is zero then a degenerate ellipse is produced which should result in square corners.
I have attached a very simple example that has a <rect> element with the rx attribute explicitly set to 0 and a non-zero ry attribute. Inkscape (and Chrome, Safari, and IE 11) renders the shape with rounded corners. Firefox renders it correctly with square corners.
The problem is also present on output. If you create a rectangle in Inkscape with one zero radius and one non-zero radius, it is rendered with rounded corners. I guess that's not necessarily wrong because Inkscape's conventions don't necessarily have to be the same as SVG. However, when this rectangle is written to an SVG file, it should either have both radii attributes written with the same value or the zero radius attribute should be omitted to ensure that other applications render it properly.
=====
Inkscape 0.91 r13725 on Mac OS X 10.10.5.
description: | updated |
tags: | added: shape-editing svg |
Changed in inkscape: | |
status: | New → Triaged |
importance: | Undecided → High |
Changed in inkscape: | |
importance: | High → Medium |
Please add information about OS/platform and Inkscape version to the bug description, thank you.