Open ad-si opened 1 year ago
I don't know much about this, but is it sometimes useful to include one and omit the other? That would lead to (Maybe Double, Maybe Double)
.
Yeah, good idea, that would be even better!
But I just realized that probably the size is necessary to calculate the layout of the SVG. So maybe there are two sizes necessary. E.g.:
render_size :: (Double, Double)
output_size :: (Maybe Double, Maybe Double)
Or one size, but with additional parameter telling whether to include it in final image or not.
(I don't know if the size is require to render layout - just giving the idea in case it is).
Or one size, but with additional parameter telling whether to include it in final image or not.
But you might want to calculate / generate it in a specific size (e.g. 1 mm == 1 px) and then display it at another size. So this might actually even be a good idea if it's not necessary to calculate the layout. Just as a way to have some control over the value magnitudes.
https://hackage.haskell.org/package/Chart-diagrams-1.9.4/docs/Graphics-Rendering-Chart-Backend-Diagrams.html#t:FileOptions size field should be
Maybe (Double, Double)
. If it's set toNothing
, thewidth
andheight
attributes would simply be omitted from the exported<svg>
tag.