-
Notifications
You must be signed in to change notification settings - Fork 567
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
Various image improvements #1461
Various image improvements #1461
Conversation
fafdf4c
to
d2c4ffd
Compare
I didn't realise that I've also added a test to check that an empty image doesnt cause a panic. I think the test will currently fail, but I have a PR in for piet (#365) that will let it pass. |
5f97151
to
521cab1
Compare
5aa4247
to
989b7cc
Compare
clip_area
and from_shared
to Image.c60a2e3
to
880e560
Compare
@derekdreery any interest in getting this landed? I'd like to do a release shortly. |
Ooh I'll revisit. |
Currently working on this. |
880e560
to
087b20f
Compare
Looks like the new rust version introduced some new clippy lints. I'll fix them in this PR. |
I will submit a piet patch. |
Ok with the |
Also add a test to check rendering an empty picture doesn't cause a panic
This commit improves the coverage and accuracy of svg support in the `Svg` widget.
e616420
to
fd611b8
Compare
fd611b8
to
f8fe8bc
Compare
Woop clippy fixed 🎆 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Currently blocked on a new release of piet.
This patch adds 3 features:
Send + Sync
bound todyn Error
s fromimage
. This means that, for example, you can load an image on a dedicated IO thread, and pass the error back to the UI thread.Svg
widget.This allows, for example, a sprite sheet to be shared between multiple
Image
widgets. It also allows my motivating use case, which is an image viewer where the user can zoom in on part of the image.I've made the changes so they are backwards compatible.
Update: this patch is growing a bit, but each commit is completely disjoint and can be reviewed/accepted separately.
Note: edited heavily.