Conversation
|
This is odd... from both Linux Wayland Gtk4 tests (with and without adwaita): And the screenshot on Linux Wayland Gtk3 is just... entirely transparent. Great. Edit: didn't realize some platforms don't support Window.as_image(). That's fine, I should only be testing that step on Cocoa and iOS anyway. |
| ) | ||
|
|
||
| inverse_transform = core_graphics.CGAffineTransformInvert(transform) | ||
| if inverse_transform == transform: |
There was a problem hiding this comment.
This is also true for the identity transform and a few others which are their own inverses (like (-1, 0, 0, -1, 0, 0) and (-1, 0, 0, 1, 0, 0)).
Edit: to be constructive, I think it suffices to check if the determinant a * d - b * c == 0.
There was a problem hiding this comment.
Hm. As I understand it, if the transform (relative to the original) is the identity matrix, then the current would equal the original and we would've already exited. But I hadn't actually realized other matrices are their own inverse as well, thanks! Math is wild.
Fixes #4044
Adding the test first...
So far I have a fix that seems to work for Cocoa, but breaks iOS in new and interesting ways.
PR Checklist: