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.
wx.lib.colourchooser.pycolourslider.PyColourSlider
, wx.lib.colourchooser.pypalette.PyPalette
Creates a canvas instance and initializes the off-screen |
|
Performs the blit of the buffer contents on-screen. |
|
Actual drawing function for drawing into the off-screen |
|
Returns a tuple that contains the coordinates of the |
|
Renders the off-screen buffer on-screen. |
|
Perform actual redraw to off-screen buffer only when the |
|
Explicitly tells the canvas to redraw it’s contents. |
|
Re-draws the buffer contents on-screen. |
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.
Creates a canvas instance and initializes the off-screen buffer. Also sets the handler for rendering the canvas automatically via size and paint calls from the windowing system.
Performs the blit of the buffer contents on-screen.
Actual drawing function for drawing into the off-screen buffer. To be overrideen in the implementing class. Do nothing by default.
Returns a tuple that contains the coordinates of the top-left and bottom-right corners of the canvas.
Renders the off-screen buffer on-screen.
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.
Explicitly tells the canvas to redraw it’s contents.
Re-draws the buffer contents on-screen.