mwcraig / ipyevents

A custom widget for returning mouse and keyboard events to Python. Documentation:
https://ipyevents.readthedocs.io/en/latest/index.html
BSD 3-Clause "New" or "Revised" License
115 stars 27 forks source link

Decide whether to round or not #12

Closed mwcraig closed 3 years ago

mwcraig commented 6 years ago

See discussion at https://github.com/jupyter-widgets/ipywidgets/pull/1727#discussion_r144482546

Basically, right now it rounds because there is not subpixel resolution anyway. If the image is really enlarged, though, it might make sense not to round.

That scenario is detectable, I think, since we can get the "natural" size of an image and we know its display size, so we can work out the size of pixels on the screen.