Add tests for one of width/height with a viewBox
Say we have an SVG document with only one of the width
and height
attributes, but with a viewBox
:
<svg xmlns="http://www.w3.org/2000/svg" width="100px" viewBox="0 0 10 20"/>
As far as I can tell, this means:
- The document's natural size is 100 pixels wide. The natural height is unspecified...
- ... but can be figured out from the 1:2 aspect ratio defined by the viewBox (height should be 200).
We should have tests to make sure that the render_document and render_layer (and the corresponding get_geometry functions) scale the SVG appropriately when there is a viewBox
, but either of width
or height
is missing.
These tests should go in librsvg_crate/tests/intrinsic_dimensions.rs.