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