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
Resizing issue #11
Comments
Hey @SoreGaInochi, could you please attach the svg file you are using so we can reproduce the problem? And once we have a minute we will most certainly look into your problem, have a great day! |
Hi @SoreGaInochi, We just released 1.0.3 version and now |
I read the post, but I'm still having some problems with big SVGs. This is my code:
and this is my SVG file: I'm not using |
Hi @GDGapps, This issue is coming from |
I'd expect to be able to override the default width and height if it's specified inside SVG. For example, this SVG is rendered as 900x780 image regardless of SwiftUI frame modifiers: <svg xmlns="http://www.w3.org/2000/svg" width="900" height="780">
<path fill="#ed2939" d="M0 0h900v780H0z"/>
<path fill="#fae042" d="M0 0h600v780H0z"/>
<path d="M0 0h300v780H0z"/>
</svg> In my case, editing the source image is not an option, as I'm loading them from the web. The above image. |
Hi @nalexn, Right now
More details here: https://github.com/exyte/SVGView/wiki/SVGView-resizing However a SVG file you mentioned doesn't have |
Thanks @ystrot ! I've been hitting an API of flagpedia, but they also have a downloadable set of country flags in SVG. Might be helpful for testing purposes. |
I've pushed a fix to scale SVG files without viewBox properly, so you can already use the main branch. We'll probably release a new version this week. Also I briefly went through country flags and even complex flags look good: Anyway If you find some issues just file a ticket. Thanks! |
All issues discussed in this ticket were fixed and available in the 1.0.4 release. |
Hi,
I'm having a resizing issue with the library. Depending on the svg file I use, I get an image correctly displayed, or I get an image taking way much space than it should (ie more space than the screen itself).
To display the svg file, I'm using this:
From what I've seen, the svg files that are defined with a large width and height are not displayed correctly, which maybe makes sense. But shouldn't svg images be stretched as we want?
The text was updated successfully, but these errors were encountered: