]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/demo/wxImage.py
2 from wxPython
.wx
import *
5 #----------------------------------------------------------------------
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()
13 panel
= wxPanel(nb
, -1)
15 wxStaticBitmap(panel
, -1, bmp
, wxPoint(10, pos
),
16 wxSize(bmp
.GetWidth(), bmp
.GetHeight()))
18 pos
= pos
+ bmp
.GetHeight() + 10
19 wxStaticBitmap(panel
, -1, gif
, wxPoint(10, pos
),
20 wxSize(gif
.GetWidth(), gif
.GetHeight()))
22 pos
= pos
+ gif
.GetHeight() + 10
23 wxStaticBitmap(panel
, -1, png
, wxPoint(10, pos
),
24 wxSize(png
.GetWidth(), png
.GetHeight()))
26 pos
= pos
+ png
.GetHeight() + 10
27 wxStaticBitmap(panel
, -1, jpg
, wxPoint(10, pos
),
28 wxSize(jpg
.GetWidth(), jpg
.GetHeight()))
32 #----------------------------------------------------------------------