]> git.saurik.com Git - wxWidgets.git/blob - wxPython/demo/wxImage.py
added wxWindows shared library to link of OpenGL wxWindows shared library
[wxWidgets.git] / wxPython / demo / wxImage.py
1
2 from wxPython.wx import *
3
4 #----------------------------------------------------------------------
5
6 def runTest(frame, nb, log):
7 bmp = wxImage('bitmaps/image.bmp', wxBITMAP_TYPE_BMP).ConvertToBitmap()
8 gif = wxImage('bitmaps/image.gif', wxBITMAP_TYPE_GIF).ConvertToBitmap()
9 png = wxImage('bitmaps/image.png', wxBITMAP_TYPE_PNG).ConvertToBitmap()
10 jpg = wxImage('bitmaps/image.jpg', wxBITMAP_TYPE_JPEG).ConvertToBitmap()
11
12 panel = wxPanel(nb, -1)
13 pos = 10
14 wxStaticBitmap(panel, -1, bmp, wxPoint(10, pos),
15 wxSize(bmp.GetWidth(), bmp.GetHeight()))
16
17 pos = pos + bmp.GetHeight() + 10
18 wxStaticBitmap(panel, -1, gif, wxPoint(10, pos),
19 wxSize(gif.GetWidth(), gif.GetHeight()))
20
21 pos = pos + gif.GetHeight() + 10
22 wxStaticBitmap(panel, -1, png, wxPoint(10, pos),
23 wxSize(png.GetWidth(), png.GetHeight()))
24
25 pos = pos + png.GetHeight() + 10
26 wxStaticBitmap(panel, -1, jpg, wxPoint(10, pos),
27 wxSize(jpg.GetWidth(), jpg.GetHeight()))
28
29 return panel
30
31 #----------------------------------------------------------------------
32
33
34
35
36
37
38
39 overview = """\
40 """