The following code demonstrates the problem with some wx cursors on Windows (OSX cursors have a white outline) ... namely, they are all black and therefore completely invisible against a black background.
import wx
app = wx.PySimpleApp()
f = wx.Frame(None)
f.SetBackgroundColour(wx.Color(0))
f.SetCursor(wx.StockCursor(wx.CURSOR_CROSS))
f.Show()
app.MainLoop()
I wonder if anyone found a way to fix the window icons, or if there is a fix for it that I don't know about.
A more specific problem that I encountered is that wft.wm.wc.cURSOR_CROSS is for scaling on imshow charts, which I use to display images that are mostly black. I have not yet found a way to configure the cursors that mpl selects, but I decided that I would pose the question while I dig.
Thanks Adam
Note. Using wxPython version 2.8.10.1 and matplotlib version 0.99 and 1.0
PROGRESS:
, , , , , , , . .
import numpy as np
buf = np.ones((16,16,3), dtype='uint8') * 127
buf[7,:,:] = 0 # horizontal black line
buf[:,7,:] = 0 # vertical black line
buf[:6,:6, :] = 255 # evidently values > 127 are interpreted as alpha
buf[9:,:6, :] = 255
buf[9:, 9:, :] = 255
buf[:6, 9:, :] = 255
im = wx.ImageFromBuffer(16, 16, buf.tostring())
im.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_X, 7)
im.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_Y, 7)
cursor = wx.CursorFromImage(im)