Content for 2D painting
The <clutter-canvas> class is a <clutter-content>
implementation that allows drawing using the Cairo API on a 2D surface.
In order to draw on a <clutter-canvas>, you should connect a
handler to the <"draw"> signal; the signal will receive a
<cairo-t> context that can be used to draw.
<clutter-canvas> will emit the <"draw"> signal when
invalidated using clutter-content-invalidate.
<clutter-canvas> is available since Clutter 1.10.
<clutter-content>)Creates a new instance of
<clutter-canvas>.You should call
clutter-canvas-set-sizeto set the size of the canvas.You should call
clutter-content-invalidateevery time you wish to draw the contents of the canvas.
- ret
- The newly allocated instance of
<clutter-canvas>. Useg-object-unrefwhen done.Since 1.10
<clutter-canvas>) (width int) (height int)Sets the size of the canvas.
This function will cause the canvas to be invalidated.
- canvas
- a
<clutter-canvas>- width
- the width of the canvas, in pixels
- height
- the height of the canvas, in pixels
Since 1.10