1999-04-30 03:29:54 +00:00
|
|
|
|
2003-12-09 01:23:28 +00:00
|
|
|
import wx
|
|
|
|
import images
|
1999-04-30 03:29:54 +00:00
|
|
|
|
|
|
|
#----------------------------------------------------------------------
|
|
|
|
|
2003-12-09 01:23:28 +00:00
|
|
|
class TestPanel(wx.Panel):
|
1999-04-30 03:29:54 +00:00
|
|
|
def __init__(self, parent, log):
|
2003-12-09 01:23:28 +00:00
|
|
|
wx.Panel.__init__(self, parent, -1)
|
1999-04-30 03:29:54 +00:00
|
|
|
self.log = log
|
|
|
|
self.count = 0
|
|
|
|
|
2004-01-13 03:17:17 +00:00
|
|
|
wx.StaticText(self, -1, "This is a wx.StaticBitmap.", (45, 15))
|
1999-04-30 03:29:54 +00:00
|
|
|
|
2001-04-09 19:36:36 +00:00
|
|
|
bmp = images.getTest2Bitmap()
|
2003-12-09 01:23:28 +00:00
|
|
|
mask = wx.MaskColour(bmp, wx.BLUE)
|
2001-02-16 08:19:50 +00:00
|
|
|
bmp.SetMask(mask)
|
2003-12-09 01:23:28 +00:00
|
|
|
wx.StaticBitmap(self, -1, bmp, (80, 50), (bmp.GetWidth(), bmp.GetHeight()))
|
1999-04-30 03:29:54 +00:00
|
|
|
|
2002-02-26 22:35:10 +00:00
|
|
|
bmp = images.getRobinBitmap()
|
2003-12-09 01:23:28 +00:00
|
|
|
wx.StaticBitmap(self, -1, bmp, (80, 150))
|
1999-04-30 03:29:54 +00:00
|
|
|
|
2003-12-09 01:23:28 +00:00
|
|
|
wx.StaticText(self, -1, "Hey, if Ousterhout can do it, so can I.", (200, 175))
|
1999-04-30 03:29:54 +00:00
|
|
|
|
|
|
|
|
|
|
|
#----------------------------------------------------------------------
|
|
|
|
|
|
|
|
def runTest(frame, nb, log):
|
|
|
|
win = TestPanel(nb, log)
|
|
|
|
return win
|
|
|
|
|
|
|
|
#----------------------------------------------------------------------
|
|
|
|
|
2003-12-09 01:23:28 +00:00
|
|
|
overview = """\
|
2004-01-13 03:17:17 +00:00
|
|
|
A StaticBitmap control displays a bitmap.
|
1999-04-30 03:29:54 +00:00
|
|
|
|
2003-12-09 01:23:28 +00:00
|
|
|
The bitmap to be displayed should have a small number of colours, such as 16,
|
|
|
|
to avoid palette problems.
|
1999-04-30 03:29:54 +00:00
|
|
|
|
2004-01-13 03:17:17 +00:00
|
|
|
A bitmap can be derived from most image formats using the wx.Image class.
|
1999-04-30 03:29:54 +00:00
|
|
|
|
2003-07-02 23:13:10 +00:00
|
|
|
"""
|
1999-04-30 03:29:54 +00:00
|
|
|
|
2003-07-02 23:13:10 +00:00
|
|
|
if __name__ == '__main__':
|
|
|
|
import sys,os
|
|
|
|
import run
|
|
|
|
run.main(['', os.path.basename(sys.argv[0])])
|