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

preserveAspectRatio is not used when rendering the SVG. #1021

Open
samorian opened this issue Dec 18, 2023 · 0 comments
Open

preserveAspectRatio is not used when rendering the SVG. #1021

samorian opened this issue Dec 18, 2023 · 0 comments

Comments

@samorian
Copy link

We display the following SVG with SvgPicture.memory(...) and SvgPicture.string(...) in our Flutter App(flutter_svg: 2.0.9).

<svg id="Ebene_1" data-name="Ebene 1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 640 360">

<image preserveAspectRatio="xMidYMid meet" width="136" height="136" transform="translate(550.5 276) scale(.47)" href="data:image/png;base64,{base64image}" />

 </svg>

preserveAspectRatio="xMidYMid meet" is not applied and the image is incorrectly stretched by a different aspect ratio.

Rendered in the browser:
image

Rendered in the app:
image

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