Home | Trees | Index | Help |
|
---|
Package wx :: Package lib :: Package colourchooser :: Module canvas :: Class Canvas |
|
object
--+ |Object
--+ |EvtHandler
--+ |Window
--+ | Canvas
PyColourSlider
,
PyPalette
A canvas class for arbitrary drawing.
The Canvas class implements a window that allows for drawing arbitrary graphics. It implements a double buffer scheme and blits the off-screen buffer to the window during paint calls by the windowing system for speed.
Some other methods for determining the canvas colour and size are also provided.
Method Summary | |
---|---|
Creates a canvas instance and initializes the off-screen buffer. | |
Performs the blit of the buffer contents on-screen. | |
Actual drawing function for drawing into the off-screen buffer. | |
Returns a tuple that contains the co-ordinates of the top-left and bottom-right corners of the canvas. | |
MakeNewBuffer(self)
| |
Renders the off-screen buffer on-screen. | |
Perform actual redraw to off-screen buffer only when the size of the canvas has changed. | |
Explicitly tells the canvas to redraw it's contents. | |
Re-draws the buffer contents on-screen. |
Property Summary |
---|
Instance Method Details |
---|
__init__(self,
parent,
id,
pos=wx.Point(-1, -1),
size=wx.Size(-1, -1),
style=33554432)
|
Blit(self, dc)Performs the blit of the buffer contents on-screen. |
DrawBuffer(self)Actual drawing function for drawing into the off-screen buffer. To be overrideen in the implementing class. Do nothing by default. |
GetBoundingRect(self)Returns a tuple that contains the co-ordinates of the top-left and bottom-right corners of the canvas. |
onPaint(self, event)Renders the off-screen buffer on-screen. |
onSize(self, event)Perform actual redraw to off-screen buffer only when the size of the canvas has changed. This saves a lot of computation since the same image can be re-used, provided the canvas size hasn't changed. |
ReDraw(self)Explicitly tells the canvas to redraw it's contents. |
Refresh(self)Re-draws the buffer contents on-screen.
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1.20050511.rpd on Thu Mar 22 12:10:48 2007 | http://epydoc.sf.net |