Texture with Cairo integration
<clutter-cairo-texture> is a
displays the contents of a Cairo context. The
<clutter-cairo-texture> actor will create a Cairo image surface
which will then be uploaded to a GL texture when needed.
<clutter-cairo-texture> uses a Cairo image surface
internally all the drawing operations will be performed in software and
not using hardware acceleration. This can lead to performance
degradation if the contents of the texture change frequently.
In order to use a
<clutter-cairo-texture> you should connect to
<"draw"> signal; the signal is emitted each time the
<clutter-cairo-texture> has been told to invalidate its contents,
clutter-cairo-texture-invalidate-rectangle or its sister
Each callback to the
<"draw"> signal will receive a
<cairo-t> context which can be used for drawing; the Cairo
context is owned by the
<clutter-cairo-texture> and should not be
<clutter-cairo-texture> is available since Clutter 1.0.
unsigned-int) ⇒ (ret
Creates a new
<clutter-cairo-texture>actor, with a surface of width by height pixels.
- the width of the surface
- the height of the surface
- the newly created
Invalidates the whole surface of a
This function will cause the
<"draw">signal to be emitted.
Clears self's internal drawing surface, so that the next upload will replace the previous contents of the
<clutter-cairo-texture>rather than adding to it.
Calling this function from within a
<"draw">signal handler will clear the invalidated area.
Utility function for setting the source color of cr using a
<clutter-color>. This function is the equivalent of:cairo_set_source_rgba (cr, color->red / 255.0, color->green / 255.0, color->blue / 255.0, color->alpha / 255.0);
- a Cairo context