Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retrieve values with viewbox transformation applied #259

Open
ant1j opened this issue Nov 22, 2024 · 0 comments
Open

Retrieve values with viewbox transformation applied #259

ant1j opened this issue Nov 22, 2024 · 0 comments

Comments

@ant1j
Copy link

ant1j commented Nov 22, 2024

Hello,

Just discover your package, and it looks like the perfect tool for the job.
I am trying to find the way to apply the viewbox to all the objects in the SVG file, in order to get the right display, since the SVG example I have has a width and height defined (default values is my guess) but the viewBox is very different, "squeezing" the y-axis.
Using the (raw) coordinates in the paths does not render properly.
I guess I need to apply the viewBox transform before, but I haven't succeded yet. I tried transform, render, or Matrix without success (e.g. just a_path.render() does not take the viewBox into account).

This is the "header of the SVG defining a width, height and viewBox:

<svg xmlns="http://www.w3.org/2000/svg" height="800" width="1200" preserveAspectRatio="xMinYMin none" xml:space="preserve" y="0" x="0" id="Layer_1" version="1.1" viewBox="-146.73 -44.575 1271.66 267.45">

The rest of the document is simple paths.

Thanks in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant