Document how legacy API makes sizing decisions
The docs for rsvg_handle_render_cairo
and render_cairo_sub
don't really mention how the size of the SVG is computed: they use the funky get_dimensions_sub
, and then use that integer-rounded size as the size of a viewport passed to render_layer
.
There is some documentation in doc/recommendations.xml about how sizing works in very abstract terms, but it is not tied to how render_cairo* actually work. This should be rewritten to be more concrete.
We should probably deprecate render_cairo* given that sizing is kind of mysterious like that. The functions that take a viewport are unambiguous, and actually handle the corner case where <svg>
has no width
, height
, or viewBox
properly by using an identity transform for the initial coordinate system.