Hi,
My goal is to draw shapes on the transparent background.
I did the research and found out two ways to get transparent
background without floatcanvas.
One way is to use wx.EVT_ERASE_BACKGROUND tricky,
that is, leave the event handler empty.
The other way is to take a screenshot to get a background
image, then draw it on wx.Panel as background.
However, the both do not work with floatcanvas. For the former,
I tried to bind the wx.EVT_ERASE_BACKGROUND to canvas.window
and for the later, I tried to create dc like:
dc = wx.ClientDC(canvas.window)
dc.DrawBitmap(background_image, 0, 0, True)
So I tried this,
canvas = fc.NavCanvas(frame)
# take a screenshot to get backgound image
...
canvas.create('Bitmap', background_image, pos = ......)
but the background_image is moveable, that is not I want.
How can I fix the background image in its position and the shapes drawn on it
can
be moved, rotated and zoomed.
Thanks a lot.
Miles
import wx.lib.floatcanvas.floatcanvas2 as fc
canvas = fc.NavCanvas(frame)
______________________________________________
FloatCanvas mailing list
[email protected]
http://paulmcnett.com/cgi-bin/mailman/listinfo/floatcanvas
_______________________________________________
FloatCanvas mailing list
[email protected]
http://paulmcnett.com/cgi-bin/mailman/listinfo/floatcanvas