13.07.2015 Views

The wxPython tutorial

The wxPython tutorial

The wxPython tutorial

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>The</strong> Graphics Device Interfacehttp://www.zetcode.com/wxpython/gdi/dc.SetBrush(brush1)dc.DrawRectangle(10, 15, 90, 60)brush2 = wx.BrushFromBitmap(wx.Bitmap('pattern2.png'))dc.SetBrush(brush2)dc.DrawRectangle(130, 15, 90, 60)brush3 = wx.BrushFromBitmap(wx.Bitmap('pattern3.png'))dc.SetBrush(brush3)dc.DrawRectangle(250, 15, 90, 60)brush4 = wx.BrushFromBitmap(wx.Bitmap('pattern4.png'))dc.SetBrush(brush4)dc.DrawRectangle(10, 105, 90, 60)brush5 = wx.BrushFromBitmap(wx.Bitmap('pattern5.png'))dc.SetBrush(brush5)dc.DrawRectangle(130, 105, 90, 60)brush6 = wx.BrushFromBitmap(wx.Bitmap('pattern6.png'))dc.SetBrush(brush6)dc.DrawRectangle(250, 105, 90, 60)brush7 = wx.BrushFromBitmap(wx.Bitmap('pattern7.png'))dc.SetBrush(brush7)dc.DrawRectangle(10, 195, 90, 60)brush8 = wx.BrushFromBitmap(wx.Bitmap('pattern8.png'))dc.SetBrush(brush8)dc.DrawRectangle(130, 195, 90, 60)brushr9 = wx.BrushFromBitmap(wx.Bitmap('pattern9.png'))dc.SetBrush(brushr9)dc.DrawRectangle(250, 195, 90, 60)app = wx.App()CustomPatterns(None, -1, 'Custom Patterns')app.MainLoop()I have created some small bitmaps. For this I used the Gimp.<strong>The</strong>se bitmaps are rectangles, usually around 40-150px.17 de 44 27/04/2008 1:08

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!