I am “translating” some code from wx.PseudoDC
to a normal wx.BufferedPaintDc
(as I need zooming functionality) and I am now wondering: what the most efficient way of replicating pdc.FindObjects
for a wx.BufferedPaintDc
?
I used the built-in FindObjects
method for mouse-click hit-testing for drawn objects before.
I doubt that querying every pixel by hand to see if the point of the drawn object matches the mouse click is optimal. I also thought about creating a 1x1px rect for the mouse cursor point and querying based on wx.Rect.Intersects
but that seems hacky. Is there a better way?