]> git.saurik.com Git - wxWidgets.git/blame - wxPython/demo/wxImage.py
use specific linker flags under Mac OS X when linking executables against the
[wxWidgets.git] / wxPython / demo / wxImage.py
CommitLineData
cf694132
RD
1
2from wxPython.wx import *
6c5ae2d2 3from Main import opj
cf694132
RD
4
5#----------------------------------------------------------------------
6
7def runTest(frame, nb, log):
6c5ae2d2
RD
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()
cf694132
RD
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
40overview = """\
41"""