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 |
| |
__init__(self,
parent,
id,
pos,
size,
style)
Creates a canvas instance and initializes the off-screen buffer. |
| |
Blit(self,
dc)
Performs the blit of the buffer contents on-screen. |
| |
DrawBuffer(self,
*args,
**kargs)
Actual drawing function for drawing into the off-screen buffer. |
| |
GetBoundingRect(self)
Returns a tuple that contains the co-ordinates of the top-left and
bottom-right corners of the canvas. |
| |
MakeNewBuffer(self)
|
| |
onEraseBackground(self,
event)
|
| |
onPaint(self,
event)
Renders the off-screen buffer on-screen. |
| |
onPostPaint(self,
dc)
|
| |
onSize(self,
event)
Perform actual redraw to off-screen buffer only when the size of the
canvas has changed. |
| |
ReDraw(self,
*args,
**kargs)
Explicitly tells the canvas to redraw it's contents. |
| |
Refresh(self)
|
| Inherited from object |
| |
__delattr__(...)
x.__delattr__('name') <==> del x.name |
| |
__getattribute__(...)
x.__getattribute__('name') <==> x.name |
| |
__hash__(x)
x.__hash__() <==> hash(x) |
| |
__new__(T,
S,
...)
T.__new__(S, ...) -> a new object with type S, a subtype of T |
| |
__reduce__(...)
helper for pickle |
| |
__reduce_ex__(...)
helper for pickle |
| |
__setattr__(...)
x.__setattr__('name', value) <==> x.name = value |
| |
__str__(x)
x.__str__() <==> str(x) |