You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should instead compute the size of each element and expand the bounds by that amount. We could even be conservative around this since generally I think it's ok to have a bit of whitespace around the elements. This would help in computation since we could just find the largest element and pad the extrema by that amount, rather than have to figure out padding for each point.
The text was updated successfully, but these errors were encountered:
Note: Until this issue is resolved, there is a workaround: add a shapes layer with a transparent fill and zero border, containing a single rectangle matching the extent you want for the svg.
Currently, we compute a tight bounding box around the coordinates of all the elements (line endpoints, circle centers, polygon vertices, etc) and output that as the bounds of the output svg. This results in clipped points and lines around the edges of the svg, see e.g. https://github.com/napari/napari-svg/blob/38fae845161c220b42b0c17dc844904300be5735/napari_svg/_tests/test_write_points_with_attributes-expected.svg.
We should instead compute the size of each element and expand the bounds by that amount. We could even be conservative around this since generally I think it's ok to have a bit of whitespace around the elements. This would help in computation since we could just find the largest element and pad the extrema by that amount, rather than have to figure out padding for each point.
The text was updated successfully, but these errors were encountered: