-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Get bounds of a container? #1120
Comments
I am also wondering this. I am trying to get relative pixel locations of an image by querying the cursor position over a displayed image. |
@QuinnFreedman |
You will need to use a canvas for that. The game of life example uses a canvas to track mouse inputs |
I have just opened #1193, which implements a |
@hecrj I believe this should work for my use case. I am trying to create a photo editor so I need to track mouse location inside the |
Is there a way to get the bounds of an element? For example, if I want to set an element to fill available space, but then I want to know how big that element actually ended up being, is there a way to query that? If not, I guess this is a feature request for that.
Also, it would be nice to know the x,y position of an element so you could translate mouse events from
iced_native::subscription::events()
into the relative coordinates of the element.For example, Elm provides that functionality in
Browser.Dom
The text was updated successfully, but these errors were encountered: