]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/demo/wxStaticBitmap.py
2 from wxPython
.wx
import *
8 #----------------------------------------------------------------------
10 class TestPanel(wxPanel
):
11 def __init__(self
, parent
, log
):
12 wxPanel
.__init
__(self
, parent
, -1)
16 wxStaticText(self
, -1, "This is a wxStaticBitmap.", wxPoint(45, 15))
18 bmp
= images
.getTest2Bitmap()
19 mask
= wxMaskColour(bmp
, wxBLUE
)
21 wxStaticBitmap(self
, -1, bmp
, wxPoint(80, 50),
22 wxSize(bmp
.GetWidth(), bmp
.GetHeight()))
24 # This one doesn't convert to the embedded format very well,
25 # (lots of colors so it explodes in size and takes a noticable
26 # amount of time to convert back to a bitmap.) So we'll just
28 bmp
= wxBitmap(opj('bitmaps/robin.jpg'), wxBITMAP_TYPE_JPEG
)
29 wxStaticBitmap(self
, -1, bmp
, (80, 150))
31 wxStaticText(self
, -1, "Hey, if Ousterhout can do it, so can I.",
35 #----------------------------------------------------------------------
37 def runTest(frame
, nb
, log
):
38 win
= TestPanel(nb
, log
)
41 #----------------------------------------------------------------------