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

SwiftUI SVG -> WebImage Inconsistencies #38

Open
mackhowell opened this issue Feb 9, 2022 · 0 comments
Open

SwiftUI SVG -> WebImage Inconsistencies #38

mackhowell opened this issue Feb 9, 2022 · 0 comments

Comments

@mackhowell
Copy link

mackhowell commented Feb 9, 2022

This coder was super easy to add which was awesome right off the bat, but I'm seeing some issues with most SVG's I try drawing.

Would love some help if I'm doing something wrong. Examples below.

SwiftUI code used:

WebImage(url: URL(string: "https://storage.opensea.io/files/30cdec8b3f25da72e82bba1c36c23fa6.svg")!, context: [.imageThumbnailPixelSize: CGSize.zero])
    .resizable()
    .scaledToFit()
    .border(Color.gray)

Example 1:

SVG url:
https://storage.opensea.io/files/30cdec8b3f25da72e82bba1c36c23fa6.svg

Output:
CleanShot 2022-02-09 at 08 11 55@2x

Issue:
This SVG is just a colored square, so ideally it should fill the entire frame of the WebImage. Instead it's only occupying a small portion.

Example 2:

SVG url:
https://storage.opensea.io/files/0a551bef6cba9c8af017420aafe7657a.svg

Output:
CleanShot 2022-02-09 at 08 16 53@2x

Issue:
The text inside the SVG is not centered.

Can provide more examples if needed.
Also happy to create a pull request to the coder if I could get a little guidance on the nature of the issues(s)

Thank you!

@mackhowell mackhowell changed the title SwiftUI SVG image inconsistencies SwiftUI SVG WebImage Inconsistencies Feb 9, 2022
@mackhowell mackhowell changed the title SwiftUI SVG WebImage Inconsistencies SwiftUI SVG -> WebImage Inconsistencies Feb 9, 2022
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