-
Notifications
You must be signed in to change notification settings - Fork 25
Description
Describe the bug
We have a couple of spots where we pass floats wrapped in ints into calls to wxPython display contexts for drawing lines, or rectangles, etc. We have to cast to int to avoid hard errors on later version of wxPython, eg 4.2.1.
Problem is that most of the time we are getting these coordinates from e.g. PYME/DSView/arrayViewPanel.py pixel_to_screen_coordinates which returns float.
So, I guess what I'm wondering is whether @David-Baddeley would prefer a PR wrapping the rest of the DrawRectangle / DrawLine args with int casts or whether it makes more sense to just return screen positions in integer pixels in the first place. Maybe there's an issue with the later approach, I haven't looked into it much, but I wanted to check before submitting a bunch of int-casts in a PR. I'm certainly fine with either approach
To Reproduce
Steps to reproduce the behavior:
- Open an image stack in PYMEImage
- add PSF extraction tools module
- try and tag a PSF
- See error drawing tagged rectangle
Platform (please complete the following information - or copy-paste from error dialog if shown):
- OS: [e.g. Win10] win10 or 11
- Python version: 3.10
- numpy version: 1.26
- wxpython version [if a UI bug]: 4.2.1
