-
-
Notifications
You must be signed in to change notification settings - Fork 123
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
Feature request: Getting window position from pixel position #366
Comments
Sounds like a reasonable request. The coordinate transformation depends on the scaling matrix, which is an internal implementation detail. (Technically the matrix can be derived from the clipping rectangle, but that's not recommended or intentional.) For anyone who wishes to implement this feature right away, the Lines 573 to 606 in 39e84aa
|
I'm sure this usecase is very esoteric, but I'm using egui with pixels and I wanted to put egui objects on the same screen location as objects I'm drawing on the pixel buffer, but to do that I need some way of going from pixel positions to window positions, and surprisingly there doesn't seem to be a way right now, even though there is a way to go from window position to pixel position via
window_pos_to_pixel
. Even without a crazy usecase like that, there are probably other scenarios where this would be something you want.The text was updated successfully, but these errors were encountered: