-
Notifications
You must be signed in to change notification settings - Fork 543
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
Missing implementation for rotating Image using software renderer #3068
Comments
... if they are not set as actual binding before As reported in #3068 The problem is that the pass will properly create the Rotation or Opacity item, but will not create the two way binding if there is no existing binding. This causes code like `img.rotation-angle = ...` to change the rotation angle of the image, but not its parent Rotation item. Fix it by making sure there is always a binding. Since the change only affect visual representation, I abused one of the screenshot test to test this feature. And I also patched another bug that some #[allow(unused_parens)] was not set in the 'init' callback and would cause a warning in the test
Thanks for your bug report! The second part about binding not working when not initialized is indeed a bug. This is being fixed in #3077 The software renderer is indeed lacking behind in therms of features. In order to implement rotated image. This is the things that needs to be done:
|
... if they are not set as actual binding before As reported in #3068 The problem is that the pass will properly create the Rotation or Opacity item, but will not create the two way binding if there is no existing binding. This causes code like `img.rotation-angle = ...` to change the rotation angle of the image, but not its parent Rotation item. Fix it by making sure there is always a binding. Since the change only affect visual representation, I abused one of the screenshot test to test this feature. And I also patched another bug that some #[allow(unused_parens)] was not set in the 'init' callback and would cause a warning in the test
Should have been open a two, separate issue. |
Thank for sharing the cool pictures @hamboooooo This issue is currently not on our short-term roadmap. If it's important to you, we encourage you to take a shot at implementing it. We'd be happy to provide mentoring, tips, and review your pull request. |
Hello !
I'm receiving a panic when i want to rotate the image in slint using software renderer (other platforms works ok)
Could you please implement the code for rotating images for sw renderer too ?
https://github.com/slint-ui/slint/blob/master/internal/core/software_renderer.rs#L1954
Also, i don't know if it is the intended way of work, but if i don't set the rotation-angle explicitly to 0 on the Image widget,
changing it elsewhere, (for instance in the clicked() callback of a button) wont do anything.
Run it with
The text was updated successfully, but these errors were encountered: