Rsvg-convert handles Cairo's "empty bounds" incorrectly when extracting elements
See #1037 (closed) and #1041 for example files.
Cairo returns an all-zeros rectangle (i.e. a point at the origin) when an path has an empty bounding box for fill or stroke. Those issues are about catching those cases and using None
, which the rest of the bounding-box machinery in librsvg is supposed to handle correctly.
However, I am not convinced that this handles the following case correctly. Consider a vertical or horizontal <polyline>
or <line>
. It has no fillable area, so those bounds are fine to represent as None
. But it does have a stroke bounding box, and definitely a path-extents even if it is an infinitely thin line. Librsvg should handle this correctly, so that rsvg-convert's --export-id
option is able to compute the bounds of that single element correctly.