Closed pcace closed 1 year ago
There's currently no built-in support for something like SVG's viewBox
attrib, but it's easy enough to calculate a global transformation matrix & apply it. I've created a little codepen for you to illustrate the overall approach. I've been planning to integrate some of these steps, but haven't had bandwidth yet to get to that. It's on the todo list though!
https://codepen.io/postspectacular/pen/wvXdryp
Hope that helps & if not please let me know (and then maybe prep a small example yourself)
@pcace - just checking if the above example helped you and if we can close this issue?
@pcace - closing this, since no feedback & the above example shows a solution...
hi there,
i am trying to find a solution for the following problem: i have a fairly complex svg wich takes way too long to render. so i tried hiccup-canvas instead with good results. Since it is way faster to draw IHiccupShapes i would like to go that way. The Problem i am facing is, that i cannot find a way to have some kind of boundingbox around my shapes. using svgs i did something like that:
when trying to do that with a canvas this is my way:
is there any way to set a bounding Box within wich the shapes are drawn? Any idea would be great!
thank you so much