from wxPython.wx import *
+import images
+
#---------------------------------------------------------------------------
class MyCanvas(wxScrolledWindow):
self.SetCursor(wxStockCursor(wxCURSOR_PENCIL))
- bmp = wxBitmap('bitmaps/test2.bmp', wxBITMAP_TYPE_BMP)
+ bmp = images.getTest2Bitmap()
mask = wxMaskColour(bmp, wxBLUE)
bmp.SetMask(mask)
self.bmp = bmp
def DoDrawing(self, dc):
dc.BeginDrawing()
- #pen1 = wxPen(wxNamedColour('RED'))
dc.SetPen(wxPen(wxNamedColour('RED')))
dc.DrawRectangle(5, 5, 50, 50)
dc.SetPen(wxPen(wxNamedColour('BLUE'), 4))
dc.DrawRectangle(15, 15, 50, 50)
- #font = wxFont(14, wxSWISS, wxNORMAL, wxNORMAL)
dc.SetFont(wxFont(14, wxSWISS, wxNORMAL, wxNORMAL))
dc.SetTextForeground(wxColour(0xFF, 0x20, 0xFF))
te = dc.GetTextExtent("Hello World")