1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>ClutterCairoTexture</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
7 <link rel="home" href="index.html" title="Clutter Reference Manual">
8 <link rel="up" href="ch02.html" title="Base actors">
9 <link rel="prev" href="ClutterText.html" title="ClutterText">
10 <link rel="next" href="ch03.html" title="Layout managers">
11 <meta name="generator" content="GTK-Doc V1.18.1 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
17 <td><a accesskey="p" href="ClutterText.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18 <td><a accesskey="u" href="ch02.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
19 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
20 <th width="100%" align="center">Clutter Reference Manual</th>
21 <td><a accesskey="n" href="ch03.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
23 <tr><td colspan="5" class="shortcuts">
24 <a href="#ClutterCairoTexture.synopsis" class="shortcut">Top</a>
26 <a href="#ClutterCairoTexture.description" class="shortcut">Description</a>
28 <a href="#ClutterCairoTexture.object-hierarchy" class="shortcut">Object Hierarchy</a>
30 <a href="#ClutterCairoTexture.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
32 <a href="#ClutterCairoTexture.properties" class="shortcut">Properties</a>
34 <a href="#ClutterCairoTexture.signals" class="shortcut">Signals</a>
37 <div class="refentry">
38 <a name="ClutterCairoTexture"></a><div class="titlepage"></div>
39 <div class="refnamediv"><table width="100%"><tr>
41 <h2><span class="refentrytitle"><a name="ClutterCairoTexture.top_of_page"></a>ClutterCairoTexture</span></h2>
42 <p>ClutterCairoTexture — Texture with Cairo integration</p>
44 <td valign="top" align="right"></td>
46 <div class="refsynopsisdiv">
47 <a name="ClutterCairoTexture.synopsis"></a><h2>Synopsis</h2>
48 <pre class="synopsis">#define <a class="link" href="ClutterCairoTexture.html#CLUTTER-CAIRO-FORMAT-ARGB32:CAPS" title="CLUTTER_CAIRO_FORMAT_ARGB32">CLUTTER_CAIRO_FORMAT_ARGB32</a>
49 struct <a class="link" href="ClutterCairoTexture.html#ClutterCairoTexture-struct" title="struct ClutterCairoTexture">ClutterCairoTexture</a>;
50 struct <a class="link" href="ClutterCairoTexture.html#ClutterCairoTextureClass" title="struct ClutterCairoTextureClass">ClutterCairoTextureClass</a>;
51 <a class="link" href="ClutterActor.html" title="ClutterActor"><span class="returnvalue">ClutterActor</span></a> * <a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-new" title="clutter_cairo_texture_new ()">clutter_cairo_texture_new</a> (<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> width</code></em>,
52 <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> height</code></em>);
53 <span class="returnvalue">void</span> <a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-set-surface-size" title="clutter_cairo_texture_set_surface_size ()">clutter_cairo_texture_set_surface_size</a>
54 (<em class="parameter"><code><a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> *self</code></em>,
55 <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> width</code></em>,
56 <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> height</code></em>);
57 <span class="returnvalue">void</span> <a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-get-surface-size" title="clutter_cairo_texture_get_surface_size ()">clutter_cairo_texture_get_surface_size</a>
58 (<em class="parameter"><code><a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> *self</code></em>,
59 <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> *width</code></em>,
60 <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> *height</code></em>);
61 <span class="returnvalue">void</span> <a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-set-auto-resize" title="clutter_cairo_texture_set_auto_resize ()">clutter_cairo_texture_set_auto_resize</a>
62 (<em class="parameter"><code><a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> *self</code></em>,
63 <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> value</code></em>);
64 <a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-get-auto-resize" title="clutter_cairo_texture_get_auto_resize ()">clutter_cairo_texture_get_auto_resize</a>
65 (<em class="parameter"><code><a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> *self</code></em>);
67 <a href="/home/ebassi/gnome3/install/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-t"><span class="returnvalue">cairo_t</span></a> * <a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-create" title="clutter_cairo_texture_create ()">clutter_cairo_texture_create</a> (<em class="parameter"><code><a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> *self</code></em>);
68 <a href="/home/ebassi/gnome3/install/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-t"><span class="returnvalue">cairo_t</span></a> * <a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-create-region" title="clutter_cairo_texture_create_region ()">clutter_cairo_texture_create_region</a> (<em class="parameter"><code><a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> *self</code></em>,
69 <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> x_offset</code></em>,
70 <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> y_offset</code></em>,
71 <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> width</code></em>,
72 <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> height</code></em>);
74 <span class="returnvalue">void</span> <a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-invalidate-rectangle" title="clutter_cairo_texture_invalidate_rectangle ()">clutter_cairo_texture_invalidate_rectangle</a>
75 (<em class="parameter"><code><a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> *self</code></em>,
76 <em class="parameter"><code><a href="/home/ebassi/gnome3/install/share/gtk-doc/html/cairo/cairo-Types.html#cairo-rectangle-int-t"><span class="type">cairo_rectangle_int_t</span></a> *rect</code></em>);
77 <span class="returnvalue">void</span> <a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-invalidate" title="clutter_cairo_texture_invalidate ()">clutter_cairo_texture_invalidate</a> (<em class="parameter"><code><a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> *self</code></em>);
78 <span class="returnvalue">void</span> <a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-clear" title="clutter_cairo_texture_clear ()">clutter_cairo_texture_clear</a> (<em class="parameter"><code><a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> *self</code></em>);
80 <span class="returnvalue">void</span> <a class="link" href="ClutterCairoTexture.html#clutter-cairo-set-source-color" title="clutter_cairo_set_source_color ()">clutter_cairo_set_source_color</a> (<em class="parameter"><code><a href="/home/ebassi/gnome3/install/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a> *cr</code></em>,
81 <em class="parameter"><code>const <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a> *color</code></em>);
84 <div class="refsect1">
85 <a name="ClutterCairoTexture.object-hierarchy"></a><h2>Object Hierarchy</h2>
86 <pre class="synopsis">
87 <a href="../gobject/gobject-The-Base-Object-Type.html#GObject">GObject</a>
88 +----<a href="../gobject/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a>
89 +----<a class="link" href="ClutterActor.html" title="ClutterActor">ClutterActor</a>
90 +----<a class="link" href="ClutterTexture.html" title="ClutterTexture">ClutterTexture</a>
91 +----ClutterCairoTexture
94 <div class="refsect1">
95 <a name="ClutterCairoTexture.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
97 ClutterCairoTexture implements
98 <a class="link" href="ClutterContainer.html" title="ClutterContainer">ClutterContainer</a>, <a class="link" href="ClutterScriptable.html" title="ClutterScriptable">ClutterScriptable</a>, <a class="link" href="ClutterAnimatable.html" title="ClutterAnimatable">ClutterAnimatable</a> and AtkImplementorIface.</p>
100 <div class="refsect1">
101 <a name="ClutterCairoTexture.properties"></a><h2>Properties</h2>
102 <pre class="synopsis">
103 "<a class="link" href="ClutterCairoTexture.html#ClutterCairoTexture--auto-resize" title='The "auto-resize" property'>auto-resize</a>" <a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write
104 "<a class="link" href="ClutterCairoTexture.html#ClutterCairoTexture--surface-height" title='The "surface-height" property'>surface-height</a>" <a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read / Write
105 "<a class="link" href="ClutterCairoTexture.html#ClutterCairoTexture--surface-width" title='The "surface-width" property'>surface-width</a>" <a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read / Write
108 <div class="refsect1">
109 <a name="ClutterCairoTexture.signals"></a><h2>Signals</h2>
110 <pre class="synopsis">
111 "<a class="link" href="ClutterCairoTexture.html#ClutterCairoTexture-create-surface" title='The "create-surface" signal'>create-surface</a>" : <a href="../gobject/gobject-Signals.html#G-SIGNAL-NO-RECURSE:CAPS"><code class="literal">No Recursion</code></a>
112 "<a class="link" href="ClutterCairoTexture.html#ClutterCairoTexture-draw" title='The "draw" signal'>draw</a>" : <a href="../gobject/gobject-Signals.html#G-SIGNAL-NO-RECURSE:CAPS"><code class="literal">No Recursion</code></a>
115 <div class="refsect1">
116 <a name="ClutterCairoTexture.description"></a><h2>Description</h2>
118 <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> is a <a class="link" href="ClutterTexture.html" title="ClutterTexture"><span class="type">ClutterTexture</span></a> that displays the contents
119 of a Cairo context. The <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> actor will create a
120 Cairo image surface which will then be uploaded to a GL texture when
125 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
126 <h3 class="title">Note</h3>
127 <p>Since <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> uses a Cairo image surface
128 internally all the drawing operations will be performed in
129 software and not using hardware acceleration. This can lead to
130 performance degradation if the contents of the texture change
136 In order to use a <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> you should connect to the
137 <a class="link" href="ClutterCairoTexture.html#ClutterCairoTexture-draw" title='The "draw" signal'><span class="type">"draw"</span></a> signal; the signal is emitted each time
138 the <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> has been told to invalidate its contents,
139 by using <a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-invalidate-rectangle" title="clutter_cairo_texture_invalidate_rectangle ()"><code class="function">clutter_cairo_texture_invalidate_rectangle()</code></a> or its
140 sister function, <a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-invalidate" title="clutter_cairo_texture_invalidate ()"><code class="function">clutter_cairo_texture_invalidate()</code></a>.
143 Each callback to the <a class="link" href="ClutterCairoTexture.html#ClutterCairoTexture-draw" title='The "draw" signal'><span class="type">"draw"</span></a> signal will receive
144 a <a href="/home/ebassi/gnome3/install/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a> context which can be used for drawing; the Cairo context
145 is owned by the <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> and should not be destroyed
150 <div class="example">
151 <a name="cairo-texture-example"></a><p class="title"><b>Example 4. A simple ClutterCairoTexture canvas</b></p>
152 <div class="example-contents">
153 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
156 <td class="listing_lines" align="right"><pre>1
275 <td class="listing_code"><pre class="programlisting"><span class="preproc">#include</span><span class="normal"> </span><span class="string"><stdlib.h></span>
276 <span class="preproc">#include</span><span class="normal"> </span><span class="string"><math.h></span>
277 <span class="preproc">#include</span><span class="normal"> </span><span class="string"><cairo.h></span>
278 <span class="preproc">#include</span><span class="normal"> </span><span class="string"><clutter/clutter.h></span>
280 <span class="keyword">static</span><span class="normal"> <a href="../glib/glib-Basic-Types.html#gboolean">gboolean</a></span>
281 <span class="function">draw_clock</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">ClutterCairoTexture</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">canvas</span><span class="symbol">,</span>
282 <span class="normal"> </span><span class="usertype">cairo_t</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">cr</span><span class="symbol">)</span>
283 <span class="cbracket">{</span>
284 <span class="normal"> </span><span class="usertype">guint</span><span class="normal"> width</span><span class="symbol">,</span><span class="normal"> height</span><span class="symbol">;</span>
285 <span class="normal"> </span><span class="usertype">GDateTime</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">now</span><span class="symbol">;</span>
286 <span class="normal"> </span><span class="type">float</span><span class="normal"> hours</span><span class="symbol">,</span><span class="normal"> minutes</span><span class="symbol">,</span><span class="normal"> seconds</span><span class="symbol">;</span>
288 <span class="normal"> </span><span class="comment">/* get the current time and compute the angles */</span>
289 <span class="normal"> now </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="../glib/glib-GDateTime.html#g-date-time-new-now-local">g_date_time_new_now_local</a></span><span class="normal"> </span><span class="symbol">();</span>
290 <span class="normal"> seconds </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="../glib/glib-GDateTime.html#g-date-time-get-second">g_date_time_get_second</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">now</span><span class="symbol">)</span><span class="normal"> </span><span class="symbol">*</span><span class="normal"> <a href="../glib/glib-Numerical-Definitions.html#G-PI:CAPS">G_PI</a> </span><span class="symbol">/</span><span class="normal"> </span><span class="number">30</span><span class="symbol">;</span>
291 <span class="normal"> minutes </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="../glib/glib-GDateTime.html#g-date-time-get-minute">g_date_time_get_minute</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">now</span><span class="symbol">)</span><span class="normal"> </span><span class="symbol">*</span><span class="normal"> <a href="../glib/glib-Numerical-Definitions.html#G-PI:CAPS">G_PI</a> </span><span class="symbol">/</span><span class="normal"> </span><span class="number">30</span><span class="symbol">;</span>
292 <span class="normal"> hours </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="../glib/glib-GDateTime.html#g-date-time-get-hour">g_date_time_get_hour</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">now</span><span class="symbol">)</span><span class="normal"> </span><span class="symbol">*</span><span class="normal"> <a href="../glib/glib-Numerical-Definitions.html#G-PI:CAPS">G_PI</a> </span><span class="symbol">/</span><span class="normal"> </span><span class="number">6</span><span class="symbol">;</span>
294 <span class="normal"> </span><span class="comment">/* clear the contents of the canvas, to avoid painting</span>
295 <span class="comment"> * over the previous frame</span>
296 <span class="comment"> */</span>
297 <span class="normal"> </span><span class="function"><a href="ClutterCairoTexture.html#clutter-cairo-texture-clear">clutter_cairo_texture_clear</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">canvas</span><span class="symbol">);</span>
299 <span class="normal"> </span><span class="comment">/* scale the modelview to the size of the surface */</span>
300 <span class="normal"> </span><span class="function"><a href="ClutterCairoTexture.html#clutter-cairo-texture-get-surface-size">clutter_cairo_texture_get_surface_size</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">canvas</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&</span><span class="normal">width</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&</span><span class="normal">height</span><span class="symbol">);</span>
301 <span class="normal"> </span><span class="function"><a href="/home/ebassi/gnome3/install/share/gtk-doc/html/cairo/cairo-Transformations.html#cairo-scale">cairo_scale</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">,</span><span class="normal"> width</span><span class="symbol">,</span><span class="normal"> height</span><span class="symbol">);</span>
303 <span class="normal"> </span><span class="function"><a href="/home/ebassi/gnome3/install/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-set-line-cap">cairo_set_line_cap</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">,</span><span class="normal"> <a href="/home/ebassi/gnome3/install/share/gtk-doc/html/cairo/cairo-cairo-t.html#CAIRO-LINE-CAP-ROUND:CAPS">CAIRO_LINE_CAP_ROUND</a></span><span class="symbol">);</span>
304 <span class="normal"> </span><span class="function"><a href="/home/ebassi/gnome3/install/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-set-line-width">cairo_set_line_width</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0.1</span><span class="symbol">);</span>
306 <span class="normal"> </span><span class="comment">/* the black rail that holds the seconds indicator */</span>
307 <span class="normal"> </span><span class="function"><a href="ClutterCairoTexture.html#clutter-cairo-set-source-color">clutter_cairo_set_source_color</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">,</span><span class="normal"> CLUTTER_COLOR_Black</span><span class="symbol">);</span>
308 <span class="normal"> </span><span class="function"><a href="/home/ebassi/gnome3/install/share/gtk-doc/html/cairo/cairo-Transformations.html#cairo-translate">cairo_translate</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0.5</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0.5</span><span class="symbol">);</span>
309 <span class="normal"> </span><span class="function"><a href="/home/ebassi/gnome3/install/share/gtk-doc/html/cairo/cairo-Paths.html#cairo-arc">cairo_arc</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0.4</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">,</span><span class="normal"> <a href="../glib/glib-Numerical-Definitions.html#G-PI:CAPS">G_PI</a> </span><span class="symbol">*</span><span class="normal"> </span><span class="number">2</span><span class="symbol">);</span>
310 <span class="normal"> </span><span class="function"><a href="/home/ebassi/gnome3/install/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-stroke">cairo_stroke</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">);</span>
312 <span class="normal"> </span><span class="comment">/* the seconds indicator */</span>
313 <span class="normal"> </span><span class="function"><a href="ClutterCairoTexture.html#clutter-cairo-set-source-color">clutter_cairo_set_source_color</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">,</span><span class="normal"> CLUTTER_COLOR_White</span><span class="symbol">);</span>
314 <span class="normal"> </span><span class="function"><a href="/home/ebassi/gnome3/install/share/gtk-doc/html/cairo/cairo-Paths.html#cairo-move-to">cairo_move_to</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">);</span>
315 <span class="normal"> </span><span class="function"><a href="/home/ebassi/gnome3/install/share/gtk-doc/html/cairo/cairo-Paths.html#cairo-arc">cairo_arc</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">,</span><span class="normal"> </span><span class="function">sinf</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">seconds</span><span class="symbol">)</span><span class="normal"> </span><span class="symbol">*</span><span class="normal"> </span><span class="number">0.4</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">-</span><span class="normal"> </span><span class="function">cosf</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">seconds</span><span class="symbol">)</span><span class="normal"> </span><span class="symbol">*</span><span class="normal"> </span><span class="number">0.4</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0.05</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">,</span><span class="normal"> <a href="../glib/glib-Numerical-Definitions.html#G-PI:CAPS">G_PI</a> </span><span class="symbol">*</span><span class="normal"> </span><span class="number">2</span><span class="symbol">);</span>
316 <span class="normal"> </span><span class="function"><a href="/home/ebassi/gnome3/install/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-fill">cairo_fill</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">);</span>
318 <span class="normal"> </span><span class="comment">/* the minutes hand */</span>
319 <span class="normal"> </span><span class="function"><a href="ClutterCairoTexture.html#clutter-cairo-set-source-color">clutter_cairo_set_source_color</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">,</span><span class="normal"> CLUTTER_COLOR_DarkChameleon</span><span class="symbol">);</span>
320 <span class="normal"> </span><span class="function"><a href="/home/ebassi/gnome3/install/share/gtk-doc/html/cairo/cairo-Paths.html#cairo-move-to">cairo_move_to</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">);</span>
321 <span class="normal"> </span><span class="function"><a href="/home/ebassi/gnome3/install/share/gtk-doc/html/cairo/cairo-Paths.html#cairo-line-to">cairo_line_to</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">,</span><span class="normal"> </span><span class="function">sinf</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">minutes</span><span class="symbol">)</span><span class="normal"> </span><span class="symbol">*</span><span class="normal"> </span><span class="number">0.4</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">-</span><span class="function">cosf</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">minutes</span><span class="symbol">)</span><span class="normal"> </span><span class="symbol">*</span><span class="normal"> </span><span class="number">0.4</span><span class="symbol">);</span>
322 <span class="normal"> </span><span class="function"><a href="/home/ebassi/gnome3/install/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-stroke">cairo_stroke</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">);</span>
324 <span class="normal"> </span><span class="comment">/* the hours hand */</span>
325 <span class="normal"> </span><span class="function"><a href="/home/ebassi/gnome3/install/share/gtk-doc/html/cairo/cairo-Paths.html#cairo-move-to">cairo_move_to</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">);</span>
326 <span class="normal"> </span><span class="function"><a href="/home/ebassi/gnome3/install/share/gtk-doc/html/cairo/cairo-Paths.html#cairo-line-to">cairo_line_to</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">,</span><span class="normal"> </span><span class="function">sinf</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">hours</span><span class="symbol">)</span><span class="normal"> </span><span class="symbol">*</span><span class="normal"> </span><span class="number">0.2</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">-</span><span class="function">cosf</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">hours</span><span class="symbol">)</span><span class="normal"> </span><span class="symbol">*</span><span class="normal"> </span><span class="number">0.2</span><span class="symbol">);</span>
327 <span class="normal"> </span><span class="function"><a href="/home/ebassi/gnome3/install/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-stroke">cairo_stroke</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">);</span>
329 <span class="normal"> </span><span class="function"><a href="../glib/glib-GDateTime.html#g-date-time-unref">g_date_time_unref</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">now</span><span class="symbol">);</span>
331 <span class="normal"> </span><span class="comment">/* we're done drawing */</span>
332 <span class="normal"> </span><span class="keyword">return</span><span class="normal"> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS">TRUE</a></span><span class="symbol">;</span>
333 <span class="cbracket">}</span>
335 <span class="keyword">static</span><span class="normal"> <a href="../glib/glib-Basic-Types.html#gboolean">gboolean</a></span>
336 <span class="function">invalidate_clock</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">gpointer</span><span class="normal"> data_</span><span class="symbol">)</span>
337 <span class="cbracket">{</span>
338 <span class="normal"> </span><span class="comment">/* invalidate the contents of the canvas */</span>
339 <span class="normal"> </span><span class="function"><a href="ClutterCairoTexture.html#clutter-cairo-texture-invalidate">clutter_cairo_texture_invalidate</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">data_</span><span class="symbol">);</span>
341 <span class="normal"> </span><span class="comment">/* keep the timeout source */</span>
342 <span class="normal"> </span><span class="keyword">return</span><span class="normal"> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS">TRUE</a></span><span class="symbol">;</span>
343 <span class="cbracket">}</span>
345 <span class="normal"><a href="../glib/glib-Dynamic-Loading-of-Modules.html#G-MODULE-EXPORT:CAPS">G_MODULE_EXPORT</a> </span><span class="type">int</span>
346 <span class="function">test_cairo_clock_main</span><span class="normal"> </span><span class="symbol">(</span><span class="type">int</span><span class="normal"> argc</span><span class="symbol">,</span><span class="normal"> </span><span class="type">char</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">argv</span><span class="symbol">[])</span>
347 <span class="cbracket">{</span>
348 <span class="normal"> </span><span class="usertype">ClutterActor</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">stage</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">canvas</span><span class="symbol">;</span>
350 <span class="normal"> </span><span class="comment">/* initialize Clutter */</span>
351 <span class="normal"> </span><span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="function"><a href="clutter-General.html#clutter-init">clutter_init</a></span><span class="normal"> </span><span class="symbol">(&</span><span class="normal">argc</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&</span><span class="normal">argv</span><span class="symbol">)</span><span class="normal"> </span><span class="symbol">!=</span><span class="normal"> <a href="clutter-General.html#CLUTTER-INIT-SUCCESS:CAPS">CLUTTER_INIT_SUCCESS</a></span><span class="symbol">)</span>
352 <span class="normal"> </span><span class="keyword">return</span><span class="normal"> EXIT_FAILURE</span><span class="symbol">;</span>
354 <span class="normal"> </span><span class="comment">/* create a resizable stage */</span>
355 <span class="normal"> stage </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="ClutterStage.html#clutter-stage-new">clutter_stage_new</a></span><span class="normal"> </span><span class="symbol">();</span>
356 <span class="normal"> </span><span class="function"><a href="ClutterStage.html#clutter-stage-set-title">clutter_stage_set_title</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function">CLUTTER_STAGE</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">stage</span><span class="symbol">),</span><span class="normal"> </span><span class="string">"2D Clock"</span><span class="symbol">);</span>
357 <span class="normal"> </span><span class="function"><a href="ClutterStage.html#clutter-stage-set-user-resizable">clutter_stage_set_user_resizable</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function">CLUTTER_STAGE</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">stage</span><span class="symbol">),</span><span class="normal"> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS">TRUE</a></span><span class="symbol">);</span>
358 <span class="normal"> </span><span class="function"><a href="ClutterActor.html#clutter-actor-set-background-color">clutter_actor_set_background_color</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">stage</span><span class="symbol">,</span><span class="normal"> CLUTTER_COLOR_LightSkyBlue</span><span class="symbol">);</span>
359 <span class="normal"> </span><span class="function"><a href="ClutterActor.html#clutter-actor-set-size">clutter_actor_set_size</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">stage</span><span class="symbol">,</span><span class="normal"> </span><span class="number">300</span><span class="symbol">,</span><span class="normal"> </span><span class="number">300</span><span class="symbol">);</span>
360 <span class="normal"> </span><span class="function"><a href="ClutterActor.html#clutter-actor-show">clutter_actor_show</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">stage</span><span class="symbol">);</span>
362 <span class="normal"> </span><span class="comment">/* our 2D canvas, courtesy of Cairo */</span>
363 <span class="normal"> canvas </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="ClutterCairoTexture.html#clutter-cairo-texture-new">clutter_cairo_texture_new</a></span><span class="normal"> </span><span class="symbol">(</span><span class="number">300</span><span class="symbol">,</span><span class="normal"> </span><span class="number">300</span><span class="symbol">);</span>
364 <span class="normal"> </span><span class="function"><a href="ClutterContainer.html#clutter-container-add-actor">clutter_container_add_actor</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function">CLUTTER_CONTAINER</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">stage</span><span class="symbol">),</span><span class="normal"> canvas</span><span class="symbol">);</span>
366 <span class="normal"> </span><span class="comment">/* bind the size of the canvas to that of the stage */</span>
367 <span class="normal"> </span><span class="function"><a href="ClutterActor.html#clutter-actor-add-constraint">clutter_actor_add_constraint</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">canvas</span><span class="symbol">,</span><span class="normal"> </span><span class="function"><a href="ClutterBindConstraint.html#clutter-bind-constraint-new">clutter_bind_constraint_new</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">stage</span><span class="symbol">,</span><span class="normal"> <a href="ClutterBindConstraint.html#CLUTTER-BIND-SIZE:CAPS">CLUTTER_BIND_SIZE</a></span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">));</span>
369 <span class="normal"> </span><span class="comment">/* make sure to match allocation to canvas size */</span>
370 <span class="normal"> </span><span class="function"><a href="ClutterCairoTexture.html#clutter-cairo-texture-set-auto-resize">clutter_cairo_texture_set_auto_resize</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function">CLUTTER_CAIRO_TEXTURE</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">canvas</span><span class="symbol">),</span><span class="normal"> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS">TRUE</a></span><span class="symbol">);</span>
372 <span class="normal"> </span><span class="comment">/* quit on destroy */</span>
373 <span class="normal"> </span><span class="function"><a href="../gobject/gobject-Signals.html#g-signal-connect">g_signal_connect</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">stage</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"destroy"</span><span class="symbol">,</span><span class="normal"> </span><span class="function"><a href="../gobject/gobject-Closures.html#G-CALLBACK:CAPS">G_CALLBACK</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal"><a href="clutter-General.html#clutter-main-quit">clutter_main_quit</a></span><span class="symbol">),</span><span class="normal"> <a href="/home/ebassi/gnome3/install/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS">NULL</a></span><span class="symbol">);</span>
375 <span class="normal"> </span><span class="comment">/* connect our drawing code */</span>
376 <span class="normal"> </span><span class="function"><a href="../gobject/gobject-Signals.html#g-signal-connect">g_signal_connect</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">canvas</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"draw"</span><span class="symbol">,</span><span class="normal"> </span><span class="function"><a href="../gobject/gobject-Closures.html#G-CALLBACK:CAPS">G_CALLBACK</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">draw_clock</span><span class="symbol">),</span><span class="normal"> <a href="/home/ebassi/gnome3/install/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS">NULL</a></span><span class="symbol">);</span>
378 <span class="normal"> </span><span class="comment">/* invalidate the canvas, so that we can draw before the main loop starts */</span>
379 <span class="normal"> </span><span class="function"><a href="ClutterCairoTexture.html#clutter-cairo-texture-invalidate">clutter_cairo_texture_invalidate</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function">CLUTTER_CAIRO_TEXTURE</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">canvas</span><span class="symbol">));</span>
381 <span class="normal"> </span><span class="comment">/* set up a timer that invalidates the canvas every second */</span>
382 <span class="normal"> </span><span class="function"><a href="clutter-General.html#clutter-threads-add-timeout">clutter_threads_add_timeout</a></span><span class="normal"> </span><span class="symbol">(</span><span class="number">1000</span><span class="symbol">,</span><span class="normal"> invalidate_clock</span><span class="symbol">,</span><span class="normal"> canvas</span><span class="symbol">);</span>
384 <span class="normal"> </span><span class="function"><a href="clutter-General.html#clutter-main">clutter_main</a></span><span class="normal"> </span><span class="symbol">();</span>
386 <span class="normal"> </span><span class="keyword">return</span><span class="normal"> EXIT_SUCCESS</span><span class="symbol">;</span>
387 <span class="cbracket">}</span>
389 <span class="normal"><a href="../glib/glib-Dynamic-Loading-of-Modules.html#G-MODULE-EXPORT:CAPS">G_MODULE_EXPORT</a> </span><span class="usertype">const</span><span class="normal"> </span><span class="type">char</span><span class="normal"> </span><span class="symbol">*</span>
390 <span class="function">test_cairo_clock_describe</span><span class="normal"> </span><span class="symbol">(</span><span class="type">void</span><span class="symbol">)</span>
391 <span class="cbracket">{</span>
392 <span class="normal"> </span><span class="keyword">return</span><span class="normal"> </span><span class="string">"Simple 2D canvas using a Cairo texture actor"</span><span class="symbol">;</span>
393 <span class="cbracket">}</span></pre></td>
400 <p><br class="example-break">
403 <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> is available since Clutter 1.0.
406 <div class="refsect1">
407 <a name="ClutterCairoTexture.details"></a><h2>Details</h2>
408 <div class="refsect2">
409 <a name="CLUTTER-CAIRO-FORMAT-ARGB32:CAPS"></a><h3>CLUTTER_CAIRO_FORMAT_ARGB32</h3>
410 <pre class="programlisting">#define CLUTTER_CAIRO_FORMAT_ARGB32 (COGL_PIXEL_FORMAT_BGRA_8888_PRE)
413 The <span class="type">CoglPixelFormat</span> to be used when uploading image data from
414 and to a Cairo image surface using <a href="/home/ebassi/gnome3/install/share/gtk-doc/html/cairo/cairo-Image-Surfaces.html#CAIRO-FORMAT-ARGB32:CAPS"><code class="literal">CAIRO_FORMAT_ARGB32</code></a> and
415 <a href="/home/ebassi/gnome3/install/share/gtk-doc/html/cairo/cairo-Image-Surfaces.html#CAIRO-FORMAT-RGB24:CAPS"><code class="literal">CAIRO_FORMAT_RGB24</code></a> as <a href="/home/ebassi/gnome3/install/share/gtk-doc/html/cairo/cairo-Image-Surfaces.html#cairo-format-t"><span class="type">cairo_format_t</span></a>.
417 <p class="since">Since 1.8</p>
420 <div class="refsect2">
421 <a name="ClutterCairoTexture-struct"></a><h3>struct ClutterCairoTexture</h3>
422 <pre class="programlisting">struct ClutterCairoTexture;</pre>
424 The <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> struct contains only private data.
426 <p class="since">Since 1.0</p>
429 <div class="refsect2">
430 <a name="ClutterCairoTextureClass"></a><h3>struct ClutterCairoTextureClass</h3>
431 <pre class="programlisting">struct ClutterCairoTextureClass {
432 cairo_surface_t *(* create_surface) (ClutterCairoTexture *texture,
436 gboolean (* draw) (ClutterCairoTexture *texture,
441 The <a class="link" href="ClutterCairoTexture.html#ClutterCairoTextureClass" title="struct ClutterCairoTextureClass"><span class="type">ClutterCairoTextureClass</span></a> struct contains only private data.
443 <div class="variablelist"><table border="0">
444 <col align="left" valign="top">
447 <td><p><span class="term"><em class="structfield"><code><a name="ClutterCairoTextureClass.create-surface"></a>create_surface</code></em> ()</span></p></td>
448 <td>class handler for the <a class="link" href="ClutterCairoTexture.html#ClutterCairoTexture-create-surface" title='The "create-surface" signal'><span class="type">"create-surface"</span></a>
452 <td><p><span class="term"><em class="structfield"><code><a name="ClutterCairoTextureClass.draw"></a>draw</code></em> ()</span></p></td>
453 <td>class handler for the <a class="link" href="ClutterCairoTexture.html#ClutterCairoTexture-draw" title='The "draw" signal'><span class="type">"draw"</span></a> signal</td>
457 <p class="since">Since 1.0</p>
460 <div class="refsect2">
461 <a name="clutter-cairo-texture-new"></a><h3>clutter_cairo_texture_new ()</h3>
462 <pre class="programlisting"><a class="link" href="ClutterActor.html" title="ClutterActor"><span class="returnvalue">ClutterActor</span></a> * clutter_cairo_texture_new (<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> width</code></em>,
463 <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> height</code></em>);</pre>
465 Creates a new <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> actor, with a surface of <em class="parameter"><code>width</code></em> by
466 <em class="parameter"><code>height</code></em> pixels.
468 <div class="variablelist"><table border="0">
469 <col align="left" valign="top">
472 <td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
473 <td>the width of the surface</td>
476 <td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
477 <td>the height of the surface</td>
480 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
481 <td>the newly created <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> actor</td>
485 <p class="since">Since 1.0</p>
488 <div class="refsect2">
489 <a name="clutter-cairo-texture-set-surface-size"></a><h3>clutter_cairo_texture_set_surface_size ()</h3>
490 <pre class="programlisting"><span class="returnvalue">void</span> clutter_cairo_texture_set_surface_size
491 (<em class="parameter"><code><a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> *self</code></em>,
492 <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> width</code></em>,
493 <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> height</code></em>);</pre>
495 Resizes the Cairo surface used by <em class="parameter"><code>self</code></em> to <em class="parameter"><code>width</code></em> and <em class="parameter"><code>height</code></em>.
498 This function will not invalidate the contents of the Cairo
499 texture: you will have to explicitly call either
500 <a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-invalidate-rectangle" title="clutter_cairo_texture_invalidate_rectangle ()"><code class="function">clutter_cairo_texture_invalidate_rectangle()</code></a> or
501 <a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-invalidate" title="clutter_cairo_texture_invalidate ()"><code class="function">clutter_cairo_texture_invalidate()</code></a>.
503 <div class="variablelist"><table border="0">
504 <col align="left" valign="top">
507 <td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
508 <td>a <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a>
512 <td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
513 <td>the new width of the surface</td>
516 <td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
517 <td>the new height of the surface</td>
521 <p class="since">Since 1.0</p>
524 <div class="refsect2">
525 <a name="clutter-cairo-texture-get-surface-size"></a><h3>clutter_cairo_texture_get_surface_size ()</h3>
526 <pre class="programlisting"><span class="returnvalue">void</span> clutter_cairo_texture_get_surface_size
527 (<em class="parameter"><code><a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> *self</code></em>,
528 <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> *width</code></em>,
529 <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> *height</code></em>);</pre>
531 Retrieves the surface width and height for <em class="parameter"><code>self</code></em>.
533 <div class="variablelist"><table border="0">
534 <col align="left" valign="top">
537 <td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
538 <td>a <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a>
542 <td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
543 <td>return location for the surface width, or <a href="/home/ebassi/gnome3/install/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
547 <td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
548 <td>return location for the surface height, or <a href="/home/ebassi/gnome3/install/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
553 <p class="since">Since 1.0</p>
556 <div class="refsect2">
557 <a name="clutter-cairo-texture-set-auto-resize"></a><h3>clutter_cairo_texture_set_auto_resize ()</h3>
558 <pre class="programlisting"><span class="returnvalue">void</span> clutter_cairo_texture_set_auto_resize
559 (<em class="parameter"><code><a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> *self</code></em>,
560 <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> value</code></em>);</pre>
562 Sets whether the <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> should ensure that the
563 backing Cairo surface used matches the allocation assigned to
564 the actor. If the allocation changes, the contents of the
565 <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> will also be invalidated automatically.
567 <div class="variablelist"><table border="0">
568 <col align="left" valign="top">
571 <td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
572 <td>a <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a>
576 <td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
578 <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> should bind the surface
579 size to the allocation</td>
583 <p class="since">Since 1.8</p>
586 <div class="refsect2">
587 <a name="clutter-cairo-texture-get-auto-resize"></a><h3>clutter_cairo_texture_get_auto_resize ()</h3>
588 <pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> clutter_cairo_texture_get_auto_resize
589 (<em class="parameter"><code><a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> *self</code></em>);</pre>
591 Retrieves the value set using <a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-set-auto-resize" title="clutter_cairo_texture_set_auto_resize ()"><code class="function">clutter_cairo_texture_set_auto_resize()</code></a>.
593 <div class="variablelist"><table border="0">
594 <col align="left" valign="top">
597 <td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
598 <td>a <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a>
602 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
604 <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> should track the
605 allocation, and <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</td>
609 <p class="since">Since 1.8</p>
612 <div class="refsect2">
613 <a name="clutter-cairo-texture-create"></a><h3>clutter_cairo_texture_create ()</h3>
614 <pre class="programlisting"><a href="/home/ebassi/gnome3/install/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-t"><span class="returnvalue">cairo_t</span></a> * clutter_cairo_texture_create (<em class="parameter"><code><a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> *self</code></em>);</pre>
615 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
616 <h3 class="title">Warning</h3>
617 <p><code class="literal">clutter_cairo_texture_create</code> has been deprecated since version 1.8 and should not be used in newly-written code. Use the <a class="link" href="ClutterCairoTexture.html#ClutterCairoTexture-draw" title='The "draw" signal'><span class="type">"draw"</span></a> signal and
618 the <a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-invalidate" title="clutter_cairo_texture_invalidate ()"><code class="function">clutter_cairo_texture_invalidate()</code></a> function to obtain a
619 Cairo context for 2D drawing.</p>
622 Creates a new Cairo context for the <em class="parameter"><code>cairo</code></em> texture. It is
623 similar to using <a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-create-region" title="clutter_cairo_texture_create_region ()"><code class="function">clutter_cairo_texture_create_region()</code></a> with <em class="parameter"><code>x_offset</code></em>
624 and <em class="parameter"><code>y_offset</code></em> of 0, <em class="parameter"><code>width</code></em> equal to the <em class="parameter"><code>cairo</code></em> texture surface width
625 and <em class="parameter"><code>height</code></em> equal to the <em class="parameter"><code>cairo</code></em> texture surface height.
629 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
630 <h3 class="title">Warning</h3>
631 <p>Do not call this function within the paint virtual
632 function or from a callback to the <a class="link" href="ClutterActor.html#ClutterActor-paint" title='The "paint" signal'><span class="type">"paint"</span></a>
637 <div class="variablelist"><table border="0">
638 <col align="left" valign="top">
641 <td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
642 <td>a <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a>
646 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
647 <td>a newly created Cairo context. Use <a href="/home/ebassi/gnome3/install/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-destroy"><code class="function">cairo_destroy()</code></a>
648 to upload the contents of the context when done drawing</td>
652 <p class="since">Since 1.0</p>
655 <div class="refsect2">
656 <a name="clutter-cairo-texture-create-region"></a><h3>clutter_cairo_texture_create_region ()</h3>
657 <pre class="programlisting"><a href="/home/ebassi/gnome3/install/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-t"><span class="returnvalue">cairo_t</span></a> * clutter_cairo_texture_create_region (<em class="parameter"><code><a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> *self</code></em>,
658 <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> x_offset</code></em>,
659 <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> y_offset</code></em>,
660 <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> width</code></em>,
661 <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> height</code></em>);</pre>
662 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
663 <h3 class="title">Warning</h3>
664 <p><code class="literal">clutter_cairo_texture_create_region</code> has been deprecated since version 1.8 and should not be used in newly-written code. Use the <a class="link" href="ClutterCairoTexture.html#ClutterCairoTexture-draw" title='The "draw" signal'><span class="type">"draw"</span></a> signal and
665 <a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-invalidate-rectangle" title="clutter_cairo_texture_invalidate_rectangle ()"><code class="function">clutter_cairo_texture_invalidate_rectangle()</code></a> to obtain a
666 clipped Cairo context for 2D drawing.</p>
669 Creates a new Cairo context that will updat the region defined
670 by <em class="parameter"><code>x_offset</code></em>, <em class="parameter"><code>y_offset</code></em>, <em class="parameter"><code>width</code></em> and <em class="parameter"><code>height</code></em>.
674 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
675 <h3 class="title">Warning</h3>
676 <p>Do not call this function within the paint virtual
677 function or from a callback to the <a class="link" href="ClutterActor.html#ClutterActor-paint" title='The "paint" signal'><span class="type">"paint"</span></a>
682 <div class="variablelist"><table border="0">
683 <col align="left" valign="top">
686 <td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
687 <td>a <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a>
691 <td><p><span class="term"><em class="parameter"><code>x_offset</code></em> :</span></p></td>
692 <td>offset of the region on the X axis</td>
695 <td><p><span class="term"><em class="parameter"><code>y_offset</code></em> :</span></p></td>
696 <td>offset of the region on the Y axis</td>
699 <td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
700 <td>width of the region, or -1 for the full surface width</td>
703 <td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
704 <td>height of the region, or -1 for the full surface height</td>
707 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
708 <td>a newly created Cairo context. Use <a href="/home/ebassi/gnome3/install/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-destroy"><code class="function">cairo_destroy()</code></a>
709 to upload the contents of the context when done drawing</td>
713 <p class="since">Since 1.0</p>
716 <div class="refsect2">
717 <a name="clutter-cairo-texture-invalidate-rectangle"></a><h3>clutter_cairo_texture_invalidate_rectangle ()</h3>
718 <pre class="programlisting"><span class="returnvalue">void</span> clutter_cairo_texture_invalidate_rectangle
719 (<em class="parameter"><code><a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> *self</code></em>,
720 <em class="parameter"><code><a href="/home/ebassi/gnome3/install/share/gtk-doc/html/cairo/cairo-Types.html#cairo-rectangle-int-t"><span class="type">cairo_rectangle_int_t</span></a> *rect</code></em>);</pre>
722 Invalidates a rectangular region of a <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a>.
725 The invalidation will cause the <a class="link" href="ClutterCairoTexture.html#ClutterCairoTexture-draw" title='The "draw" signal'><span class="type">"draw"</span></a> signal
729 See also: <a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-invalidate" title="clutter_cairo_texture_invalidate ()"><code class="function">clutter_cairo_texture_invalidate()</code></a>
731 <div class="variablelist"><table border="0">
732 <col align="left" valign="top">
735 <td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
736 <td>a <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a>
740 <td><p><span class="term"><em class="parameter"><code>rect</code></em> :</span></p></td>
741 <td>a rectangle with the area to invalida,
742 or <a href="/home/ebassi/gnome3/install/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> to perform an unbounded invalidation. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
747 <p class="since">Since 1.8</p>
750 <div class="refsect2">
751 <a name="clutter-cairo-texture-invalidate"></a><h3>clutter_cairo_texture_invalidate ()</h3>
752 <pre class="programlisting"><span class="returnvalue">void</span> clutter_cairo_texture_invalidate (<em class="parameter"><code><a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> *self</code></em>);</pre>
754 Invalidates the whole surface of a <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a>.
757 This function will cause the <a class="link" href="ClutterCairoTexture.html#ClutterCairoTexture-draw" title='The "draw" signal'><span class="type">"draw"</span></a> signal
761 See also: <a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-invalidate-rectangle" title="clutter_cairo_texture_invalidate_rectangle ()"><code class="function">clutter_cairo_texture_invalidate_rectangle()</code></a>
763 <div class="variablelist"><table border="0">
764 <col align="left" valign="top">
766 <td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
767 <td>a <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a>
771 <p class="since">Since 1.8</p>
774 <div class="refsect2">
775 <a name="clutter-cairo-texture-clear"></a><h3>clutter_cairo_texture_clear ()</h3>
776 <pre class="programlisting"><span class="returnvalue">void</span> clutter_cairo_texture_clear (<em class="parameter"><code><a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> *self</code></em>);</pre>
778 Clears <em class="parameter"><code>self</code></em>'s internal drawing surface, so that the next upload
779 will replace the previous contents of the <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a>
780 rather than adding to it.
783 Calling this function from within a <a class="link" href="ClutterCairoTexture.html#ClutterCairoTexture-draw" title='The "draw" signal'><span class="type">"draw"</span></a>
784 signal handler will clear the invalidated area.
786 <div class="variablelist"><table border="0">
787 <col align="left" valign="top">
789 <td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
790 <td>a <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a>
794 <p class="since">Since 1.0</p>
797 <div class="refsect2">
798 <a name="clutter-cairo-set-source-color"></a><h3>clutter_cairo_set_source_color ()</h3>
799 <pre class="programlisting"><span class="returnvalue">void</span> clutter_cairo_set_source_color (<em class="parameter"><code><a href="/home/ebassi/gnome3/install/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-t"><span class="type">cairo_t</span></a> *cr</code></em>,
800 <em class="parameter"><code>const <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a> *color</code></em>);</pre>
802 Utility function for setting the source color of <em class="parameter"><code>cr</code></em> using
803 a <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a>. This function is the equivalent of:
807 <div class="informalexample">
808 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
811 <td class="listing_lines" align="right"><pre>1
816 <td class="listing_code"><pre class="programlisting"><span class="function"><a href="/home/ebassi/gnome3/install/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-set-source-rgba">cairo_set_source_rgba</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cr</span><span class="symbol">,</span>
817 <span class="normal"> color</span><span class="symbol">-></span><span class="normal">red </span><span class="symbol">/</span><span class="normal"> </span><span class="number">255.0</span><span class="symbol">,</span>
818 <span class="normal"> color</span><span class="symbol">-></span><span class="normal">green </span><span class="symbol">/</span><span class="normal"> </span><span class="number">255.0</span><span class="symbol">,</span>
819 <span class="normal"> color</span><span class="symbol">-></span><span class="normal">blue </span><span class="symbol">/</span><span class="normal"> </span><span class="number">255.0</span><span class="symbol">,</span>
820 <span class="normal"> color</span><span class="symbol">-></span><span class="normal">alpha </span><span class="symbol">/</span><span class="normal"> </span><span class="number">255.0</span><span class="symbol">);</span></pre></td>
828 <div class="variablelist"><table border="0">
829 <col align="left" valign="top">
832 <td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
833 <td>a Cairo context</td>
836 <td><p><span class="term"><em class="parameter"><code>color</code></em> :</span></p></td>
837 <td>a <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a>
842 <p class="since">Since 1.0</p>
845 <div class="refsect1">
846 <a name="ClutterCairoTexture.property-details"></a><h2>Property Details</h2>
847 <div class="refsect2">
848 <a name="ClutterCairoTexture--auto-resize"></a><h3>The <code class="literal">"auto-resize"</code> property</h3>
849 <pre class="programlisting"> "auto-resize" <a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write</pre>
851 Controls whether the <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> should automatically
852 resize the Cairo surface whenever the actor's allocation changes.
853 If :auto-resize is set to <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> the surface contents will also
854 be invalidated automatically.
856 <p>Default value: FALSE</p>
857 <p class="since">Since 1.8</p>
860 <div class="refsect2">
861 <a name="ClutterCairoTexture--surface-height"></a><h3>The <code class="literal">"surface-height"</code> property</h3>
862 <pre class="programlisting"> "surface-height" <a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read / Write</pre>
864 The height of the Cairo surface used by the <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a>
867 <p>Default value: 0</p>
868 <p class="since">Since 1.0</p>
871 <div class="refsect2">
872 <a name="ClutterCairoTexture--surface-width"></a><h3>The <code class="literal">"surface-width"</code> property</h3>
873 <pre class="programlisting"> "surface-width" <a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read / Write</pre>
875 The width of the Cairo surface used by the <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a>
878 <p>Default value: 0</p>
879 <p class="since">Since 1.0</p>
882 <div class="refsect1">
883 <a name="ClutterCairoTexture.signal-details"></a><h2>Signal Details</h2>
884 <div class="refsect2">
885 <a name="ClutterCairoTexture-create-surface"></a><h3>The <code class="literal">"create-surface"</code> signal</h3>
886 <pre class="programlisting"><span class="returnvalue">CairoSurface</span>* user_function (<a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> *texture,
887 <a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> width,
888 <a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> height,
889 <a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data) : <a href="../gobject/gobject-Signals.html#G-SIGNAL-NO-RECURSE:CAPS"><code class="literal">No Recursion</code></a></pre>
891 The ::create-surface signal is emitted when a <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a>
892 news its surface (re)created, which happens either when the Cairo
893 context is created with <a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-create" title="clutter_cairo_texture_create ()"><code class="function">clutter_cairo_texture_create()</code></a> or
894 <a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-create-region" title="clutter_cairo_texture_create_region ()"><code class="function">clutter_cairo_texture_create_region()</code></a>, or when the surface is resized
895 through <a class="link" href="ClutterCairoTexture.html#clutter-cairo-texture-set-surface-size" title="clutter_cairo_texture_set_surface_size ()"><code class="function">clutter_cairo_texture_set_surface_size()</code></a>.
898 The first signal handler that returns a non-<a href="/home/ebassi/gnome3/install/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>, valid surface will
899 stop any further signal emission, and the returned surface will be
902 <div class="variablelist"><table border="0">
903 <col align="left" valign="top">
906 <td><p><span class="term"><em class="parameter"><code>texture</code></em> :</span></p></td>
907 <td>the <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> that emitted the signal</td>
910 <td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
911 <td>the width of the surface to create</td>
914 <td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
915 <td>the height of the surface to create</td>
918 <td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
919 <td>user data set when the signal handler was connected.</td>
922 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
923 <td>the newly created <a href="/home/ebassi/gnome3/install/share/gtk-doc/html/cairo/cairo-cairo-surface-t.html#cairo-surface-t"><span class="type">cairo_surface_t</span></a> for the texture</td>
927 <p class="since">Since 1.6</p>
930 <div class="refsect2">
931 <a name="ClutterCairoTexture-draw"></a><h3>The <code class="literal">"draw"</code> signal</h3>
932 <pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> user_function (<a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> *texture,
933 <span class="type">CairoContext</span> *cr,
934 <a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data) : <a href="../gobject/gobject-Signals.html#G-SIGNAL-NO-RECURSE:CAPS"><code class="literal">No Recursion</code></a></pre>
936 The ::draw signal is emitted each time a <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> has
940 The passed Cairo context passed will be clipped to the invalidated
944 It is safe to connect multiple callbacks to this signals; the state
945 of the Cairo context passed to each callback is automatically saved
946 and restored, so it's not necessary to call <a href="/home/ebassi/gnome3/install/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-save"><code class="function">cairo_save()</code></a> and
947 <a href="/home/ebassi/gnome3/install/share/gtk-doc/html/cairo/cairo-cairo-t.html#cairo-restore"><code class="function">cairo_restore()</code></a>.
949 <div class="variablelist"><table border="0">
950 <col align="left" valign="top">
953 <td><p><span class="term"><em class="parameter"><code>texture</code></em> :</span></p></td>
954 <td>the <a class="link" href="ClutterCairoTexture.html" title="ClutterCairoTexture"><span class="type">ClutterCairoTexture</span></a> that emitted the signal</td>
957 <td><p><span class="term"><em class="parameter"><code>cr</code></em> :</span></p></td>
958 <td>the Cairo context to use to draw</td>
961 <td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
962 <td>user data set when the signal handler was connected.</td>
965 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
967 <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the signal emission should stop, and <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>
972 <p class="since">Since 1.8</p>
978 Generated by GTK-Doc V1.18.1</div>