Open kivimango opened 1 year ago
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 Let's keep track only of the fact that the rotation is not implemented in the software renderer.
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:
One need to implement the todo!() to store the angle in the self.current_state
. https://github.com/slint-ui/slint/blob/3e420b32ad7a2e0bca6b3a3193d0c68d1302abf0/internal/core/software_renderer.rs#L1954
And handle this rotation in SceneBuilder::draw_image_impl
. This means computing the geometry of the bounding rectangle of the rotated image and store the rotation angle in the SceneTexture.
draw_functions::draw_texture_line
to handle this angle. This means that for each pixel, we would have a pos
which is computed with a matrix multiplication instead of having a contsant y_pos
. Since this code is performence sensitive, we probably want to have two different code path. Instead of doing a matrix multiplication of each pixel, one can just cache a delta x and an delta y or something like that.Should have been open a two, separate issue. Will do next time. Thanks anyway.
Waiting
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. Our roadmap is flexible and responsive to the needs of our users and customers. If this issue is a blocker for you, please let us know by email or chat. Share details about your project, and we'll consider prioritizing it or offering it as a service.
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