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

SVGImageView addition #532

Open
bburan opened this issue Sep 20, 2023 · 3 comments
Open

SVGImageView addition #532

bburan opened this issue Sep 20, 2023 · 3 comments

Comments

@bburan
Copy link
Contributor

bburan commented Sep 20, 2023

I currently have an implementation that uses RawWidget with QtSvgWidget to display a SVG image. I'm thinking about cleaning this up and contributing to Enaml. Would this be better implemented as an SVGImageView widget (as opposed to trying to add support for SVG images to ImageView? I'm guessing a separate SVGImageView is more appropriate since the characteristics of vector graphics are different from raster graphics. ?

Either case, the point is to get feedback before I implement this.

@frmdstryr
Copy link
Contributor

Is there any difference in the usage?

@bburan
Copy link
Contributor Author

bburan commented Sep 27, 2023

After reviewing ImageView, there are a few minor differences that suggest making SVGImageView a separate widget. For example, scale_to_fit and allow_upscaling are not relevant for a SVG image. Plus, ImageView takes an instance of Image, which is very raster-oriented (e.g., raw_size, transform_mode, etc.).

@MatthieuDartiailh
Copy link
Member

Your analysis makes sense. Would there be any sense to have a kind of abstraction over vector graphics ?

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

3 participants