2014-01-22 67 views
0

我問,因爲在每幅畫中都存在閃爍效果。例如,我有一個面板動畫wxDC塗料的最佳方法

panel = wx.Panel(self, -1) 
panel.Bind(wx.EVT_PAINT, self.asd) 
framesizer.Add(panel, flag=wx.EXPAND) 

回調是ASD功能。現在我畫

dc = wx.PaintDC(panel) 

[...] setting brush and misc 

i = 10 
for x in range(1, 100): 
    i = i + x 
    dc.Clear() # <- Look this... it's correct? 
    dc.DrawRectangle(i,10,50,50) 

回答