]>
git.saurik.com Git - wxWidgets.git/blob - utils/wxPython/demo/wxImage.py
2 from wxPython
.wx
import *
4 #----------------------------------------------------------------------
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()
12 panel
= wxPanel(nb
, -1)
14 wxStaticBitmap(panel
, -1, bmp
, wxPoint(10, pos
),
15 wxSize(bmp
.GetWidth(), bmp
.GetHeight()))
17 pos
= pos
+ bmp
.GetHeight() + 10
18 wxStaticBitmap(panel
, -1, gif
, wxPoint(10, pos
),
19 wxSize(gif
.GetWidth(), gif
.GetHeight()))
21 pos
= pos
+ gif
.GetHeight() + 10
22 wxStaticBitmap(panel
, -1, png
, wxPoint(10, pos
),
23 wxSize(png
.GetWidth(), png
.GetHeight()))
25 pos
= pos
+ png
.GetHeight() + 10
26 wxStaticBitmap(panel
, -1, jpg
, wxPoint(10, pos
),
27 wxSize(jpg
.GetWidth(), jpg
.GetHeight()))
31 #----------------------------------------------------------------------