]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/tests/test_gcMemDC.py
   2 Tests using a memory dc (or a buffered dc) as the target of a 
   7 #import os; print "PID:", os.getpid(); raw_input("Press Enter...") 
  10 class TestPanel(wx
.Panel
): 
  11     def __init__(self
, *args
, **kw
): 
  12         wx
.Panel
.__init
__(self
, *args
, **kw
) 
  13         self
.Bind(wx
.EVT_PAINT
, self
.OnPaint
) 
  14         self
.Bind(wx
.EVT_SIZE
, self
.OnSize
) 
  16     def OnSize(self
, evt
): 
  19     def OnPaint(self
, evt
): 
  20         #dc = wx.PaintDC(self) 
  21         dc 
= wx
.BufferedPaintDC(self
) 
  25         gcdc
.SetBackground(wx
.Brush(self
.GetBackgroundColour())) 
  27         gcdc
.DrawLine(0, 0, sz
.width
, sz
.height
) 
  28         gcdc
.DrawLine(sz
.width
, 0, 0, sz
.height
) 
  32 frm 
= wx
.Frame(None, title
="GC/MemoryDC")