summaryrefslogtreecommitdiff
path: root/doc/public/html/cairo-cairo-pattern-t.html
diff options
context:
space:
mode:
Diffstat (limited to 'doc/public/html/cairo-cairo-pattern-t.html')
-rw-r--r--doc/public/html/cairo-cairo-pattern-t.html874
1 files changed, 867 insertions, 7 deletions
diff --git a/doc/public/html/cairo-cairo-pattern-t.html b/doc/public/html/cairo-cairo-pattern-t.html
index d1f1be5..3567cfe 100644
--- a/doc/public/html/cairo-cairo-pattern-t.html
+++ b/doc/public/html/cairo-cairo-pattern-t.html
@@ -95,6 +95,58 @@
<em class="parameter"><code><span class="type">double</span> *x1</code></em>,
<em class="parameter"><code><span class="type">double</span> *y1</code></em>,
<em class="parameter"><code><span class="type">double</span> *r1</code></em>);
+<a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="returnvalue">cairo_pattern_t</span></a> * <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-create-mesh" title="cairo_pattern_create_mesh ()">cairo_pattern_create_mesh</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
+<span class="returnvalue">void</span> <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-mesh-begin-patch" title="cairo_pattern_mesh_begin_patch ()">cairo_pattern_mesh_begin_patch</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>);
+<span class="returnvalue">void</span> <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-mesh-end-patch" title="cairo_pattern_mesh_end_patch ()">cairo_pattern_mesh_end_patch</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>);
+<span class="returnvalue">void</span> <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-mesh-move-to" title="cairo_pattern_mesh_move_to ()">cairo_pattern_mesh_move_to</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>,
+ <em class="parameter"><code><span class="type">double</span> x</code></em>,
+ <em class="parameter"><code><span class="type">double</span> y</code></em>);
+<span class="returnvalue">void</span> <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-mesh-line-to" title="cairo_pattern_mesh_line_to ()">cairo_pattern_mesh_line_to</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>,
+ <em class="parameter"><code><span class="type">double</span> x</code></em>,
+ <em class="parameter"><code><span class="type">double</span> y</code></em>);
+<span class="returnvalue">void</span> <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-mesh-curve-to" title="cairo_pattern_mesh_curve_to ()">cairo_pattern_mesh_curve_to</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>,
+ <em class="parameter"><code><span class="type">double</span> x1</code></em>,
+ <em class="parameter"><code><span class="type">double</span> y1</code></em>,
+ <em class="parameter"><code><span class="type">double</span> x2</code></em>,
+ <em class="parameter"><code><span class="type">double</span> y2</code></em>,
+ <em class="parameter"><code><span class="type">double</span> x3</code></em>,
+ <em class="parameter"><code><span class="type">double</span> y3</code></em>);
+<span class="returnvalue">void</span> <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-mesh-set-control-point" title="cairo_pattern_mesh_set_control_point ()">cairo_pattern_mesh_set_control_point</a>
+ (<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>,
+ <em class="parameter"><code>unsigned <span class="type">int</span> point_num</code></em>,
+ <em class="parameter"><code><span class="type">double</span> x</code></em>,
+ <em class="parameter"><code><span class="type">double</span> y</code></em>);
+<span class="returnvalue">void</span> <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-mesh-set-corner-color-rgb" title="cairo_pattern_mesh_set_corner_color_rgb ()">cairo_pattern_mesh_set_corner_color_rgb</a>
+ (<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>,
+ <em class="parameter"><code>unsigned <span class="type">int</span> corner_num</code></em>,
+ <em class="parameter"><code><span class="type">double</span> red</code></em>,
+ <em class="parameter"><code><span class="type">double</span> green</code></em>,
+ <em class="parameter"><code><span class="type">double</span> blue</code></em>);
+<span class="returnvalue">void</span> <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-mesh-set-corner-color-rgba" title="cairo_pattern_mesh_set_corner_color_rgba ()">cairo_pattern_mesh_set_corner_color_rgba</a>
+ (<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>,
+ <em class="parameter"><code>unsigned <span class="type">int</span> corner_num</code></em>,
+ <em class="parameter"><code><span class="type">double</span> red</code></em>,
+ <em class="parameter"><code><span class="type">double</span> green</code></em>,
+ <em class="parameter"><code><span class="type">double</span> blue</code></em>,
+ <em class="parameter"><code><span class="type">double</span> alpha</code></em>);
+<a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a> <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-mesh-get-patch-count" title="cairo_pattern_mesh_get_patch_count ()">cairo_pattern_mesh_get_patch_count</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>,
+ <em class="parameter"><code>unsigned <span class="type">int</span> *count</code></em>);
+<a class="link" href="cairo-Paths.html#cairo-path-t" title="cairo_path_t"><span class="returnvalue">cairo_path_t</span></a> * <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-mesh-get-path" title="cairo_pattern_mesh_get_path ()">cairo_pattern_mesh_get_path</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>,
+ <em class="parameter"><code>unsigned <span class="type">int</span> patch_num</code></em>);
+<a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a> <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-mesh-get-control-point" title="cairo_pattern_mesh_get_control_point ()">cairo_pattern_mesh_get_control_point</a>
+ (<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>,
+ <em class="parameter"><code>unsigned <span class="type">int</span> patch_num</code></em>,
+ <em class="parameter"><code>unsigned <span class="type">int</span> point_num</code></em>,
+ <em class="parameter"><code><span class="type">double</span> *x</code></em>,
+ <em class="parameter"><code><span class="type">double</span> *y</code></em>);
+<a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a> <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-mesh-get-corner-color-rgba" title="cairo_pattern_mesh_get_corner_color_rgba ()">cairo_pattern_mesh_get_corner_color_rgba</a>
+ (<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>,
+ <em class="parameter"><code>unsigned <span class="type">int</span> patch_num</code></em>,
+ <em class="parameter"><code>unsigned <span class="type">int</span> corner_num</code></em>,
+ <em class="parameter"><code><span class="type">double</span> *red</code></em>,
+ <em class="parameter"><code><span class="type">double</span> *green</code></em>,
+ <em class="parameter"><code><span class="type">double</span> *blue</code></em>,
+ <em class="parameter"><code><span class="type">double</span> *alpha</code></em>);
<a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="returnvalue">cairo_pattern_t</span></a> * <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-reference" title="cairo_pattern_reference ()">cairo_pattern_reference</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>);
<span class="returnvalue">void</span> <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-destroy" title="cairo_pattern_destroy ()">cairo_pattern_destroy</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>);
<a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a> <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-status" title="cairo_pattern_status ()">cairo_pattern_status</a> (<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>);
@@ -131,9 +183,11 @@ brush too.
</p>
<p>
A cairo pattern is created by using one of the many constructors,
-of the form cairo_pattern_create_<span class="emphasis"><em>type</em></span>()
+of the form
+<code class="function">cairo_pattern_create_<span class="emphasis"><em>type</em></span>()</code>
or implicitly through
-cairo_set_source_<span class="emphasis"><em>type</em></span>() functions.
+<code class="function">cairo_set_source_<span class="emphasis"><em>type</em></span>()</code>
+functions.
</p>
</div>
<div class="refsect1" title="Details">
@@ -150,9 +204,10 @@ for different types of sources; for example,
opaque color.
</p>
<p>
-Other than various cairo_pattern_create_<span class="emphasis"><em>type</em></span>()
-functions, some of the pattern types can be implicitly created
-using various cairo_set_source_<span class="emphasis"><em>type</em></span>() functions;
+Other than various
+<code class="function">cairo_pattern_create_<span class="emphasis"><em>type</em></span>()</code>
+functions, some of the pattern types can be implicitly created using various
+<code class="function">cairo_set_source_<span class="emphasis"><em>type</em></span>()</code> functions;
for example <a class="link" href="cairo-cairo-t.html#cairo-set-source-rgb" title="cairo_set_source_rgb ()"><code class="function">cairo_set_source_rgb()</code></a>.
</p>
<p>
@@ -845,6 +900,802 @@ gradient pattern.
<p class="since">Since 1.4</p>
</div>
<hr>
+<div class="refsect2" title="cairo_pattern_create_mesh ()">
+<a name="cairo-pattern-create-mesh"></a><h3>cairo_pattern_create_mesh ()</h3>
+<pre class="programlisting"><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="returnvalue">cairo_pattern_t</span></a> * cairo_pattern_create_mesh (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
+<p>
+Create a new mesh pattern.
+</p>
+<p>
+Mesh patterns are tensor-product patch meshes (type 7 shadings in
+PDF). Mesh patterns may also be used to create other types of
+shadings that are special cases of tensor-product patch meshes such
+as Coons patch meshes (type 6 shading in PDF) and Gouraud-shaded
+triangle meshes (type 4 and 5 shadings in PDF).
+</p>
+<p>
+Mesh patterns consist of one or more tensor-product patches, which
+should be defined before using the mesh pattern. Using a mesh
+pattern with a partially defined patch as source or mask will put
+the context in an error status with a status of
+<a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-INVALID-MESH-CONSTRUCTION:CAPS"><code class="literal">CAIRO_STATUS_INVALID_MESH_CONSTRUCTION</code></a>.
+</p>
+<p>
+A tensor-product patch is defined by 4 Bézier curves (side 0, 1, 2,
+3) and by 4 additional control points (P0, P1, P2, P3) that provide
+further control over the patch and complete the definition of the
+tensor-product patch. The corner C0 is the first point of the
+patch.
+</p>
+<p>
+Degenerate sides are permitted so straight lines may be used. A
+zero length line on one side may be used to create 3 sided patches.
+</p>
+<p>
+</p>
+<div class="informalexample"><pre class="programlisting">
+ C1 Side 1 C2
+ +---------------+
+ | |
+ | P1 P2 |
+ | |
+Side 0 | | Side 2
+ | |
+ | |
+ | P0 P3 |
+ | |
+ +---------------+
+ C0 Side 3 C3
+</pre></div>
+<p>
+</p>
+<p>
+Each patch is constructed by first calling
+<a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-mesh-begin-patch" title="cairo_pattern_mesh_begin_patch ()"><code class="function">cairo_pattern_mesh_begin_patch()</code></a>, then <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-mesh-move-to" title="cairo_pattern_mesh_move_to ()"><code class="function">cairo_pattern_mesh_move_to()</code></a>
+to specify the first point in the patch (C0). Then the sides are
+specified with calls to <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-mesh-curve-to" title="cairo_pattern_mesh_curve_to ()"><code class="function">cairo_pattern_mesh_curve_to()</code></a> and
+<a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-mesh-line-to" title="cairo_pattern_mesh_line_to ()"><code class="function">cairo_pattern_mesh_line_to()</code></a>.
+</p>
+<p>
+The four additional control points (P0, P1, P2, P3) in a patch can
+be specified with <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-mesh-set-control-point" title="cairo_pattern_mesh_set_control_point ()"><code class="function">cairo_pattern_mesh_set_control_point()</code></a>.
+</p>
+<p>
+At each corner of the patch (C0, C1, C2, C3) a color may be
+specified with <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-mesh-set-corner-color-rgb" title="cairo_pattern_mesh_set_corner_color_rgb ()"><code class="function">cairo_pattern_mesh_set_corner_color_rgb()</code></a> or
+<a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-mesh-set-corner-color-rgba" title="cairo_pattern_mesh_set_corner_color_rgba ()"><code class="function">cairo_pattern_mesh_set_corner_color_rgba()</code></a>. Any corner whose color
+is not explicitly specified defaults to transparent black.
+</p>
+<p>
+A Coons patch is a special case of the tensor-product patch where
+the control points are implicitly defined by the sides of the
+patch. The default value for any control point not specified is the
+implicit value for a Coons patch, i.e. if no control points are
+specified the patch is a Coons patch.
+</p>
+<p>
+A triangle is a special case of the tensor-product patch where the
+control points are implicitly defined by the sides of the patch,
+all the sides are lines and one of them has length 0, i.e. if the
+patch is specified using just 3 lines, it is a triangle. If the
+corners connected by the 0-length side have the same color, the
+patch is a Gouraud-shaded triangle.
+</p>
+<p>
+Patches may be oriented differently to the above diagram. For
+example the first point could be at the top left. The diagram only
+shows the relationship between the sides, corners and control
+points. Regardless of where the first point is located, when
+specifying colors, corner 0 will always be the first point, corner
+1 the point between side 0 and side 1 etc.
+</p>
+<p>
+Calling <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-mesh-end-patch" title="cairo_pattern_mesh_end_patch ()"><code class="function">cairo_pattern_mesh_end_patch()</code></a> completes the current
+patch. If less than 4 sides have been defined, the first missing
+side is defined as a line from the current point to the first point
+of the patch (C0) and the other sides are degenerate lines from C0
+to C0. The corners between the added sides will all be coincident
+with C0 of the patch and their color will be set to be the same as
+the color of C0.
+</p>
+<p>
+Additional patches may be added with additional calls to
+<a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-mesh-begin-patch" title="cairo_pattern_mesh_begin_patch ()"><code class="function">cairo_pattern_mesh_begin_patch()</code></a>/<a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-mesh-end-patch" title="cairo_pattern_mesh_end_patch ()"><code class="function">cairo_pattern_mesh_end_patch()</code></a>.
+</p>
+<p>
+</p>
+<div class="informalexample"><pre class="programlisting">
+cairo_pattern_t *mesh = cairo_pattern_mesh_create_mesh ();
+
+/* Add a Coons patch */
+cairo_pattern_mesh_begin_patch (mesh);
+cairo_pattern_mesh_move_to (pattern, 0, 0);
+cairo_pattern_mesh_curve_to (pattern, 30, -30, 60, 30, 100, 0);
+cairo_pattern_mesh_curve_to (pattern, 60, 30, 130, 60, 100, 100);
+cairo_pattern_mesh_curve_to (pattern, 60, 70, 30, 130, 0, 100);
+cairo_pattern_mesh_curve_to (pattern, 30, 70, -30, 30, 0, 0);
+cairo_pattern_mesh_set_corner_color_rgb (pattern, 0, 1, 0, 0);
+cairo_pattern_mesh_set_corner_color_rgb (pattern, 1, 0, 1, 0);
+cairo_pattern_mesh_set_corner_color_rgb (pattern, 2, 0, 0, 1);
+cairo_pattern_mesh_set_corner_color_rgb (pattern, 3, 1, 1, 0);
+cairo_pattern_mesh_end_patch (mesh);
+
+/* Add a Gouraud-shaded triangle */
+cairo_pattern_mesh_begin_patch (mesh)
+cairo_pattern_mesh_move_to (pattern, 100, 100);
+cairo_pattern_mesh_line_to (pattern, 130, 130);
+cairo_pattern_mesh_line_to (pattern, 130, 70);
+cairo_pattern_mesh_set_corner_color_rgb (pattern, 0, 1, 0, 0);
+cairo_pattern_mesh_set_corner_color_rgb (pattern, 1, 0, 1, 0);
+cairo_pattern_mesh_set_corner_color_rgb (pattern, 2, 0, 0, 1);
+cairo_pattern_mesh_end_patch (mesh)
+</pre></div>
+<p>
+</p>
+<p>
+When two patches overlap, the last one that has been added is drawn
+over the first one.
+</p>
+<p>
+When a patch folds over itself, points are sorted depending on
+their parameter coordinates inside the patch. The v coordinate
+ranges from 0 to 1 when moving from side 3 to side 1; the u
+coordinate ranges from 0 to 1 when going from side 0 to side
+2. Points with higher v coordinate hide points with lower v
+coordinate. When two points have the same v coordinate, the one
+with higher u coordinate is above. This means that points nearer to
+side 1 are above points nearer to side 3; when this is not
+sufficient to decide which point is above (for example when both
+points belong to side 1 or side 3) points nearer to side 2 are
+above points nearer to side 0.
+</p>
+<p>
+For a complete definition of tensor-product patches, see the PDF
+specification (ISO32000), which describes the parametrization in
+detail.
+</p>
+<p>
+Note: The coordinates are always in pattern space. For a new
+pattern, pattern space is identical to user space, but the
+relationship between the spaces can be changed with
+<a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-set-matrix" title="cairo_pattern_set_matrix ()"><code class="function">cairo_pattern_set_matrix()</code></a>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> the newly created <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> if successful, or
+an error pattern in case of no memory. The caller owns the returned
+object and should call <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-destroy" title="cairo_pattern_destroy ()"><code class="function">cairo_pattern_destroy()</code></a> when finished with
+it.
+
+This function will always return a valid pointer, but if an error
+occurred the pattern status will be set to an error. To inspect the
+status of a pattern use <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-status" title="cairo_pattern_status ()"><code class="function">cairo_pattern_status()</code></a>.
+
+</td>
+</tr></tbody>
+</table></div>
+<p class="since">Since 1.12</p>
+</div>
+<hr>
+<div class="refsect2" title="cairo_pattern_mesh_begin_patch ()">
+<a name="cairo-pattern-mesh-begin-patch"></a><h3>cairo_pattern_mesh_begin_patch ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span> cairo_pattern_mesh_begin_patch (<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>);</pre>
+<p>
+Begin a patch in a mesh pattern.
+</p>
+<p>
+After calling this function, the patch shape should be defined with
+<a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-mesh-move-to" title="cairo_pattern_mesh_move_to ()"><code class="function">cairo_pattern_mesh_move_to()</code></a>, <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-mesh-line-to" title="cairo_pattern_mesh_line_to ()"><code class="function">cairo_pattern_mesh_line_to()</code></a> and
+<a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-mesh-curve-to" title="cairo_pattern_mesh_curve_to ()"><code class="function">cairo_pattern_mesh_curve_to()</code></a>.
+</p>
+<p>
+After defining the patch, <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-mesh-end-patch" title="cairo_pattern_mesh_end_patch ()"><code class="function">cairo_pattern_mesh_end_patch()</code></a> must be
+called before using <em class="parameter"><code>pattern</code></em> as a source or mask.
+</p>
+<p>
+Note: If <em class="parameter"><code>pattern</code></em> is not a mesh pattern then <em class="parameter"><code>pattern</code></em> will be put
+into an error status with a status of
+<a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-PATTERN-TYPE-MISMATCH:CAPS"><code class="literal">CAIRO_STATUS_PATTERN_TYPE_MISMATCH</code></a>. If <em class="parameter"><code>pattern</code></em> already has a
+current patch, it will be put into an error status with a status of
+<a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-INVALID-MESH-CONSTRUCTION:CAPS"><code class="literal">CAIRO_STATUS_INVALID_MESH_CONSTRUCTION</code></a>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>pattern</code></em> :</span></p></td>
+<td>a <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a>
+</td>
+</tr></tbody>
+</table></div>
+<p class="since">Since 1.12</p>
+</div>
+<hr>
+<div class="refsect2" title="cairo_pattern_mesh_end_patch ()">
+<a name="cairo-pattern-mesh-end-patch"></a><h3>cairo_pattern_mesh_end_patch ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span> cairo_pattern_mesh_end_patch (<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>);</pre>
+<p>
+Indicates the end of the current patch in a mesh pattern.
+</p>
+<p>
+If the current patch has less than 4 sides, it is closed with a
+straight line from the current point to the first point of the
+patch as if <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-mesh-line-to" title="cairo_pattern_mesh_line_to ()"><code class="function">cairo_pattern_mesh_line_to()</code></a> was used.
+</p>
+<p>
+Note: If <em class="parameter"><code>pattern</code></em> is not a mesh pattern then <em class="parameter"><code>pattern</code></em> will be put
+into an error status with a status of
+<a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-PATTERN-TYPE-MISMATCH:CAPS"><code class="literal">CAIRO_STATUS_PATTERN_TYPE_MISMATCH</code></a>. If <em class="parameter"><code>pattern</code></em> has no current
+patch or the current patch has no current point, <em class="parameter"><code>pattern</code></em> will be
+put into an error status with a status of
+<a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-INVALID-MESH-CONSTRUCTION:CAPS"><code class="literal">CAIRO_STATUS_INVALID_MESH_CONSTRUCTION</code></a>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>pattern</code></em> :</span></p></td>
+<td>a <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a>
+</td>
+</tr></tbody>
+</table></div>
+<p class="since">Since 1.12</p>
+</div>
+<hr>
+<div class="refsect2" title="cairo_pattern_mesh_move_to ()">
+<a name="cairo-pattern-mesh-move-to"></a><h3>cairo_pattern_mesh_move_to ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span> cairo_pattern_mesh_move_to (<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>,
+ <em class="parameter"><code><span class="type">double</span> x</code></em>,
+ <em class="parameter"><code><span class="type">double</span> y</code></em>);</pre>
+<p>
+Define the first point of the current patch in a mesh pattern.
+</p>
+<p>
+After this call the current point will be (<em class="parameter"><code>x</code></em>, <em class="parameter"><code>y</code></em>).
+</p>
+<p>
+Note: If <em class="parameter"><code>pattern</code></em> is not a mesh pattern then <em class="parameter"><code>pattern</code></em> will be put
+into an error status with a status of
+<a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-PATTERN-TYPE-MISMATCH:CAPS"><code class="literal">CAIRO_STATUS_PATTERN_TYPE_MISMATCH</code></a>. If <em class="parameter"><code>pattern</code></em> has no current
+patch or the current patch already has at leas one side, <em class="parameter"><code>pattern</code></em>
+will be put into an error status with a status of
+<a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-INVALID-MESH-CONSTRUCTION:CAPS"><code class="literal">CAIRO_STATUS_INVALID_MESH_CONSTRUCTION</code></a>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>pattern</code></em> :</span></p></td>
+<td>a <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
+<td>the X coordinate of the new position
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
+<td>the Y coordinate of the new position
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since 1.12</p>
+</div>
+<hr>
+<div class="refsect2" title="cairo_pattern_mesh_line_to ()">
+<a name="cairo-pattern-mesh-line-to"></a><h3>cairo_pattern_mesh_line_to ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span> cairo_pattern_mesh_line_to (<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>,
+ <em class="parameter"><code><span class="type">double</span> x</code></em>,
+ <em class="parameter"><code><span class="type">double</span> y</code></em>);</pre>
+<p>
+Adds a line to the current patch from the current point to position
+(<em class="parameter"><code>x</code></em>, <em class="parameter"><code>y</code></em>) in pattern-space coordinates.
+</p>
+<p>
+If there is no current point before the call to
+<a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-mesh-line-to" title="cairo_pattern_mesh_line_to ()"><code class="function">cairo_pattern_mesh_line_to()</code></a> this function will behave as
+cairo_pattern_mesh_move_to(<em class="parameter"><code>pattern</code></em>, <em class="parameter"><code>x</code></em>, <em class="parameter"><code>y</code></em>).
+</p>
+<p>
+After this call the current point will be (<em class="parameter"><code>x</code></em>, <em class="parameter"><code>y</code></em>).
+</p>
+<p>
+Note: If <em class="parameter"><code>pattern</code></em> is not a mesh pattern then <em class="parameter"><code>pattern</code></em> will be put
+into an error status with a status of
+<a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-PATTERN-TYPE-MISMATCH:CAPS"><code class="literal">CAIRO_STATUS_PATTERN_TYPE_MISMATCH</code></a>. If <em class="parameter"><code>pattern</code></em> has no current
+patch or the current patch already has 4 sides, <em class="parameter"><code>pattern</code></em> will be
+put into an error status with a status of
+<a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-INVALID-MESH-CONSTRUCTION:CAPS"><code class="literal">CAIRO_STATUS_INVALID_MESH_CONSTRUCTION</code></a>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>pattern</code></em> :</span></p></td>
+<td>a <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
+<td>the X coordinate of the end of the new line
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
+<td>the Y coordinate of the end of the new line
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since 1.12</p>
+</div>
+<hr>
+<div class="refsect2" title="cairo_pattern_mesh_curve_to ()">
+<a name="cairo-pattern-mesh-curve-to"></a><h3>cairo_pattern_mesh_curve_to ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span> cairo_pattern_mesh_curve_to (<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>,
+ <em class="parameter"><code><span class="type">double</span> x1</code></em>,
+ <em class="parameter"><code><span class="type">double</span> y1</code></em>,
+ <em class="parameter"><code><span class="type">double</span> x2</code></em>,
+ <em class="parameter"><code><span class="type">double</span> y2</code></em>,
+ <em class="parameter"><code><span class="type">double</span> x3</code></em>,
+ <em class="parameter"><code><span class="type">double</span> y3</code></em>);</pre>
+<p>
+Adds a cubic Bézier spline to the current patch from the current
+point to position (<em class="parameter"><code>x3</code></em>, <em class="parameter"><code>y3</code></em>) in pattern-space coordinates, using
+(<em class="parameter"><code>x1</code></em>, <em class="parameter"><code>y1</code></em>) and (<em class="parameter"><code>x2</code></em>, <em class="parameter"><code>y2</code></em>) as the control points.
+</p>
+<p>
+If the current patch has no current point before the call to
+<a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-mesh-curve-to" title="cairo_pattern_mesh_curve_to ()"><code class="function">cairo_pattern_mesh_curve_to()</code></a>, this function will behave as if
+preceded by a call to cairo_pattern_mesh_move_to(<em class="parameter"><code>pattern</code></em>, <em class="parameter"><code>x1</code></em>,
+<em class="parameter"><code>y1</code></em>).
+</p>
+<p>
+After this call the current point will be (<em class="parameter"><code>x3</code></em>, <em class="parameter"><code>y3</code></em>).
+</p>
+<p>
+Note: If <em class="parameter"><code>pattern</code></em> is not a mesh pattern then <em class="parameter"><code>pattern</code></em> will be put
+into an error status with a status of
+<a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-PATTERN-TYPE-MISMATCH:CAPS"><code class="literal">CAIRO_STATUS_PATTERN_TYPE_MISMATCH</code></a>. If <em class="parameter"><code>pattern</code></em> has no current
+patch or the current patch already has 4 sides, <em class="parameter"><code>pattern</code></em> will be
+put into an error status with a status of
+<a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-INVALID-MESH-CONSTRUCTION:CAPS"><code class="literal">CAIRO_STATUS_INVALID_MESH_CONSTRUCTION</code></a>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>pattern</code></em> :</span></p></td>
+<td>a <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>x1</code></em> :</span></p></td>
+<td>the X coordinate of the first control point
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>y1</code></em> :</span></p></td>
+<td>the Y coordinate of the first control point
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>x2</code></em> :</span></p></td>
+<td>the X coordinate of the second control point
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>y2</code></em> :</span></p></td>
+<td>the Y coordinate of the second control point
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>x3</code></em> :</span></p></td>
+<td>the X coordinate of the end of the curve
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>y3</code></em> :</span></p></td>
+<td>the Y coordinate of the end of the curve
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since 1.12</p>
+</div>
+<hr>
+<div class="refsect2" title="cairo_pattern_mesh_set_control_point ()">
+<a name="cairo-pattern-mesh-set-control-point"></a><h3>cairo_pattern_mesh_set_control_point ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span> cairo_pattern_mesh_set_control_point
+ (<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>,
+ <em class="parameter"><code>unsigned <span class="type">int</span> point_num</code></em>,
+ <em class="parameter"><code><span class="type">double</span> x</code></em>,
+ <em class="parameter"><code><span class="type">double</span> y</code></em>);</pre>
+<p>
+Set an internal control point of the current patch.
+</p>
+<p>
+Valid values for <em class="parameter"><code>point_num</code></em> are from 0 to 3 and identify the
+control points as explained in <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-create-mesh" title="cairo_pattern_create_mesh ()"><code class="function">cairo_pattern_create_mesh()</code></a>.
+</p>
+<p>
+Note: If <em class="parameter"><code>pattern</code></em> is not a mesh pattern then <em class="parameter"><code>pattern</code></em> will be put
+into an error status with a status of
+<a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-PATTERN-TYPE-MISMATCH:CAPS"><code class="literal">CAIRO_STATUS_PATTERN_TYPE_MISMATCH</code></a>. If <em class="parameter"><code>point_num</code></em> is not valid,
+<em class="parameter"><code>pattern</code></em> will be put into an error status with a status of
+<a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-INVALID-INDEX:CAPS"><code class="literal">CAIRO_STATUS_INVALID_INDEX</code></a>. If <em class="parameter"><code>pattern</code></em> has no current patch,
+<em class="parameter"><code>pattern</code></em> will be put into an error status with a status of
+<a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-INVALID-MESH-CONSTRUCTION:CAPS"><code class="literal">CAIRO_STATUS_INVALID_MESH_CONSTRUCTION</code></a>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>pattern</code></em> :</span></p></td>
+<td>a <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>point_num</code></em> :</span></p></td>
+<td>the control point to set the position for
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
+<td>the X coordinate of the control point
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
+<td>the Y coordinate of the control point
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since 1.12</p>
+</div>
+<hr>
+<div class="refsect2" title="cairo_pattern_mesh_set_corner_color_rgb ()">
+<a name="cairo-pattern-mesh-set-corner-color-rgb"></a><h3>cairo_pattern_mesh_set_corner_color_rgb ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span> cairo_pattern_mesh_set_corner_color_rgb
+ (<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>,
+ <em class="parameter"><code>unsigned <span class="type">int</span> corner_num</code></em>,
+ <em class="parameter"><code><span class="type">double</span> red</code></em>,
+ <em class="parameter"><code><span class="type">double</span> green</code></em>,
+ <em class="parameter"><code><span class="type">double</span> blue</code></em>);</pre>
+<p>
+Sets the color of a corner of the current patch in a mesh pattern.
+</p>
+<p>
+The color is specified in the same way as in <a class="link" href="cairo-cairo-t.html#cairo-set-source-rgb" title="cairo_set_source_rgb ()"><code class="function">cairo_set_source_rgb()</code></a>.
+</p>
+<p>
+Valid values for <em class="parameter"><code>corner_num</code></em> are from 0 to 3 and identify the
+corners as explained in <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-create-mesh" title="cairo_pattern_create_mesh ()"><code class="function">cairo_pattern_create_mesh()</code></a>.
+</p>
+<p>
+Note: If <em class="parameter"><code>pattern</code></em> is not a mesh pattern then <em class="parameter"><code>pattern</code></em> will be put
+into an error status with a status of
+<a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-PATTERN-TYPE-MISMATCH:CAPS"><code class="literal">CAIRO_STATUS_PATTERN_TYPE_MISMATCH</code></a>. If <em class="parameter"><code>corner_num</code></em> is not valid,
+<em class="parameter"><code>pattern</code></em> will be put into an error status with a status of
+<a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-INVALID-INDEX:CAPS"><code class="literal">CAIRO_STATUS_INVALID_INDEX</code></a>. If <em class="parameter"><code>pattern</code></em> has no current patch,
+<em class="parameter"><code>pattern</code></em> will be put into an error status with a status of
+<a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-INVALID-MESH-CONSTRUCTION:CAPS"><code class="literal">CAIRO_STATUS_INVALID_MESH_CONSTRUCTION</code></a>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>pattern</code></em> :</span></p></td>
+<td>a <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>corner_num</code></em> :</span></p></td>
+<td>the corner to set the color for
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>red</code></em> :</span></p></td>
+<td>red component of color
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>green</code></em> :</span></p></td>
+<td>green component of color
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>blue</code></em> :</span></p></td>
+<td>blue component of color
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since 1.12</p>
+</div>
+<hr>
+<div class="refsect2" title="cairo_pattern_mesh_set_corner_color_rgba ()">
+<a name="cairo-pattern-mesh-set-corner-color-rgba"></a><h3>cairo_pattern_mesh_set_corner_color_rgba ()</h3>
+<pre class="programlisting"><span class="returnvalue">void</span> cairo_pattern_mesh_set_corner_color_rgba
+ (<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>,
+ <em class="parameter"><code>unsigned <span class="type">int</span> corner_num</code></em>,
+ <em class="parameter"><code><span class="type">double</span> red</code></em>,
+ <em class="parameter"><code><span class="type">double</span> green</code></em>,
+ <em class="parameter"><code><span class="type">double</span> blue</code></em>,
+ <em class="parameter"><code><span class="type">double</span> alpha</code></em>);</pre>
+<p>
+Sets the color of a corner of the current patch in a mesh pattern.
+</p>
+<p>
+The color is specified in the same way as in <a class="link" href="cairo-cairo-t.html#cairo-set-source-rgba" title="cairo_set_source_rgba ()"><code class="function">cairo_set_source_rgba()</code></a>.
+</p>
+<p>
+Valid values for <em class="parameter"><code>corner_num</code></em> are from 0 to 3 and identify the
+corners as explained in <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-create-mesh" title="cairo_pattern_create_mesh ()"><code class="function">cairo_pattern_create_mesh()</code></a>.
+</p>
+<p>
+Note: If <em class="parameter"><code>pattern</code></em> is not a mesh pattern then <em class="parameter"><code>pattern</code></em> will be put
+into an error status with a status of
+<a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-PATTERN-TYPE-MISMATCH:CAPS"><code class="literal">CAIRO_STATUS_PATTERN_TYPE_MISMATCH</code></a>. If <em class="parameter"><code>corner_num</code></em> is not valid,
+<em class="parameter"><code>pattern</code></em> will be put into an error status with a status of
+<a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-INVALID-INDEX:CAPS"><code class="literal">CAIRO_STATUS_INVALID_INDEX</code></a>. If <em class="parameter"><code>pattern</code></em> has no current patch,
+<em class="parameter"><code>pattern</code></em> will be put into an error status with a status of
+<a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-INVALID-MESH-CONSTRUCTION:CAPS"><code class="literal">CAIRO_STATUS_INVALID_MESH_CONSTRUCTION</code></a>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>pattern</code></em> :</span></p></td>
+<td>a <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>corner_num</code></em> :</span></p></td>
+<td>the corner to set the color for
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>red</code></em> :</span></p></td>
+<td>red component of color
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>green</code></em> :</span></p></td>
+<td>green component of color
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>blue</code></em> :</span></p></td>
+<td>blue component of color
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>alpha</code></em> :</span></p></td>
+<td>alpha component of color
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since 1.12</p>
+</div>
+<hr>
+<div class="refsect2" title="cairo_pattern_mesh_get_patch_count ()">
+<a name="cairo-pattern-mesh-get-patch-count"></a><h3>cairo_pattern_mesh_get_patch_count ()</h3>
+<pre class="programlisting"><a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a> cairo_pattern_mesh_get_patch_count (<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>,
+ <em class="parameter"><code>unsigned <span class="type">int</span> *count</code></em>);</pre>
+<p>
+Gets the number of patches specified in the given mesh pattern.
+</p>
+<p>
+The number only includes patches which have been finished by
+calling <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-mesh-end-patch" title="cairo_pattern_mesh_end_patch ()"><code class="function">cairo_pattern_mesh_end_patch()</code></a>. For example it will be 0
+during the definition of the first patch.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>pattern</code></em> :</span></p></td>
+<td>a <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>count</code></em> :</span></p></td>
+<td>return value for the number patches, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a>, or
+<a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-PATTERN-TYPE-MISMATCH:CAPS"><code class="literal">CAIRO_STATUS_PATTERN_TYPE_MISMATCH</code></a> if <em class="parameter"><code>pattern</code></em> is not a mesh
+pattern.
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since 1.12</p>
+</div>
+<hr>
+<div class="refsect2" title="cairo_pattern_mesh_get_path ()">
+<a name="cairo-pattern-mesh-get-path"></a><h3>cairo_pattern_mesh_get_path ()</h3>
+<pre class="programlisting"><a class="link" href="cairo-Paths.html#cairo-path-t" title="cairo_path_t"><span class="returnvalue">cairo_path_t</span></a> * cairo_pattern_mesh_get_path (<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>,
+ <em class="parameter"><code>unsigned <span class="type">int</span> patch_num</code></em>);</pre>
+<p>
+Gets path defining the patch <em class="parameter"><code>patch_num</code></em> for a mesh
+pattern.
+</p>
+<p>
+<em class="parameter"><code>patch_num</code></em> can range 0 to 1 less than the number returned by
+<a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-mesh-get-patch-count" title="cairo_pattern_mesh_get_patch_count ()"><code class="function">cairo_pattern_mesh_get_patch_count()</code></a>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>pattern</code></em> :</span></p></td>
+<td>a <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>patch_num</code></em> :</span></p></td>
+<td>the patch number to return data for
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> the path defining the patch, or a path with status
+<a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-INVALID-INDEX:CAPS"><code class="literal">CAIRO_STATUS_INVALID_INDEX</code></a> if <em class="parameter"><code>patch_num</code></em> or <em class="parameter"><code>point_num</code></em> is not
+valid for <em class="parameter"><code>pattern</code></em>. If <em class="parameter"><code>pattern</code></em> is not a mesh pattern, a path with
+status <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-PATTERN-TYPE-MISMATCH:CAPS"><code class="literal">CAIRO_STATUS_PATTERN_TYPE_MISMATCH</code></a> is returned.
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since 1.12</p>
+</div>
+<hr>
+<div class="refsect2" title="cairo_pattern_mesh_get_control_point ()">
+<a name="cairo-pattern-mesh-get-control-point"></a><h3>cairo_pattern_mesh_get_control_point ()</h3>
+<pre class="programlisting"><a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a> cairo_pattern_mesh_get_control_point
+ (<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>,
+ <em class="parameter"><code>unsigned <span class="type">int</span> patch_num</code></em>,
+ <em class="parameter"><code>unsigned <span class="type">int</span> point_num</code></em>,
+ <em class="parameter"><code><span class="type">double</span> *x</code></em>,
+ <em class="parameter"><code><span class="type">double</span> *y</code></em>);</pre>
+<p>
+Gets the control point <em class="parameter"><code>point_num</code></em> of patch <em class="parameter"><code>patch_num</code></em> for a mesh
+pattern.
+</p>
+<p>
+<em class="parameter"><code>patch_num</code></em> can range 0 to 1 less than the number returned by
+<a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-mesh-get-patch-count" title="cairo_pattern_mesh_get_patch_count ()"><code class="function">cairo_pattern_mesh_get_patch_count()</code></a>.
+</p>
+<p>
+Valid values for <em class="parameter"><code>point_num</code></em> are from 0 to 3 and identify the
+control points as explained in <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-create-mesh" title="cairo_pattern_create_mesh ()"><code class="function">cairo_pattern_create_mesh()</code></a>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>pattern</code></em> :</span></p></td>
+<td>a <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>patch_num</code></em> :</span></p></td>
+<td>the patch number to return data for
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>point_num</code></em> :</span></p></td>
+<td>the control point number to return data for
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
+<td>return value for the x coordinate of the control point, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
+<td>return value for the y coordinate of the control point, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a>, or <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-INVALID-INDEX:CAPS"><code class="literal">CAIRO_STATUS_INVALID_INDEX</code></a>
+if <em class="parameter"><code>patch_num</code></em> or <em class="parameter"><code>point_num</code></em> is not valid for <em class="parameter"><code>pattern</code></em>. If <em class="parameter"><code>pattern</code></em>
+is not a mesh pattern, <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-PATTERN-TYPE-MISMATCH:CAPS"><code class="literal">CAIRO_STATUS_PATTERN_TYPE_MISMATCH</code></a> is
+returned.
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since 1.12</p>
+</div>
+<hr>
+<div class="refsect2" title="cairo_pattern_mesh_get_corner_color_rgba ()">
+<a name="cairo-pattern-mesh-get-corner-color-rgba"></a><h3>cairo_pattern_mesh_get_corner_color_rgba ()</h3>
+<pre class="programlisting"><a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a> cairo_pattern_mesh_get_corner_color_rgba
+ (<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>,
+ <em class="parameter"><code>unsigned <span class="type">int</span> patch_num</code></em>,
+ <em class="parameter"><code>unsigned <span class="type">int</span> corner_num</code></em>,
+ <em class="parameter"><code><span class="type">double</span> *red</code></em>,
+ <em class="parameter"><code><span class="type">double</span> *green</code></em>,
+ <em class="parameter"><code><span class="type">double</span> *blue</code></em>,
+ <em class="parameter"><code><span class="type">double</span> *alpha</code></em>);</pre>
+<p>
+Gets the color information in corner <em class="parameter"><code>corner_num</code></em> of patch
+<em class="parameter"><code>patch_num</code></em> for a mesh pattern.
+</p>
+<p>
+<em class="parameter"><code>patch_num</code></em> can range 0 to 1 less than the number returned by
+<a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-mesh-get-patch-count" title="cairo_pattern_mesh_get_patch_count ()"><code class="function">cairo_pattern_mesh_get_patch_count()</code></a>.
+</p>
+<p>
+Valid values for <em class="parameter"><code>corner_num</code></em> are from 0 to 3 and identify the
+corners as explained in <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-create-mesh" title="cairo_pattern_create_mesh ()"><code class="function">cairo_pattern_create_mesh()</code></a>.
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>pattern</code></em> :</span></p></td>
+<td>a <a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>patch_num</code></em> :</span></p></td>
+<td>the patch number to return data for
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>corner_num</code></em> :</span></p></td>
+<td>the corner number to return data for
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>red</code></em> :</span></p></td>
+<td>return value for red component of color, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>green</code></em> :</span></p></td>
+<td>return value for green component of color, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>blue</code></em> :</span></p></td>
+<td>return value for blue component of color, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>alpha</code></em> :</span></p></td>
+<td>return value for alpha component of color, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a>, or <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-INVALID-INDEX:CAPS"><code class="literal">CAIRO_STATUS_INVALID_INDEX</code></a>
+if <em class="parameter"><code>patch_num</code></em> or <em class="parameter"><code>corner_num</code></em> is not valid for <em class="parameter"><code>pattern</code></em>. If
+<em class="parameter"><code>pattern</code></em> is not a mesh pattern, <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-PATTERN-TYPE-MISMATCH:CAPS"><code class="literal">CAIRO_STATUS_PATTERN_TYPE_MISMATCH</code></a>
+is returned.
+
+</td>
+</tr>
+</tbody>
+</table></div>
+<p class="since">Since 1.12</p>
+</div>
+<hr>
<div class="refsect2" title="cairo_pattern_reference ()">
<a name="cairo-pattern-reference"></a><h3>cairo_pattern_reference ()</h3>
<pre class="programlisting"><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="returnvalue">cairo_pattern_t</span></a> * cairo_pattern_reference (<em class="parameter"><code><a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-t" title="cairo_pattern_t"><span class="type">cairo_pattern_t</span></a> *pattern</code></em>);</pre>
@@ -933,6 +1784,9 @@ example, outside the surface bounds or outside the gradient
geometry).
</p>
<p>
+Mesh patterns are not affected by the extend mode.
+</p>
+<p>
The default extend mode is <a class="link" href="cairo-cairo-pattern-t.html#CAIRO-EXTEND-NONE:CAPS"><code class="literal">CAIRO_EXTEND_NONE</code></a> for surface patterns
and <a class="link" href="cairo-cairo-pattern-t.html#CAIRO-EXTEND-PAD:CAPS"><code class="literal">CAIRO_EXTEND_PAD</code></a> for gradient patterns.
</p>
@@ -1040,7 +1894,7 @@ pattern.
<p>
<a class="link" href="cairo-cairo-pattern-t.html#cairo-filter-t" title="enum cairo_filter_t"><span class="type">cairo_filter_t</span></a> is used to indicate what filtering should be
applied when reading pixel values from patterns. See
-<code class="function">cairo_pattern_set_source()</code> for indicating the desired filter to be
+<a class="link" href="cairo-cairo-pattern-t.html#cairo-pattern-set-filter" title="cairo_pattern_set_filter ()"><code class="function">cairo_pattern_set_filter()</code></a> for indicating the desired filter to be
used with a particular pattern.
</p>
<div class="variablelist"><table border="0">
@@ -1236,7 +2090,8 @@ Stores the pattern's transformation matrix into <em class="parameter"><code>matr
CAIRO_PATTERN_TYPE_SOLID,
CAIRO_PATTERN_TYPE_SURFACE,
CAIRO_PATTERN_TYPE_LINEAR,
- CAIRO_PATTERN_TYPE_RADIAL
+ CAIRO_PATTERN_TYPE_RADIAL,
+ CAIRO_PATTERN_TYPE_MESH
} cairo_pattern_type_t;
</pre>
<p>
@@ -1288,6 +2143,11 @@ color. It may be opaque or translucent.
<td>The pattern is a radial gradient.
</td>
</tr>
+<tr>
+<td><p><a name="CAIRO-PATTERN-TYPE-MESH:CAPS"></a><span class="term"><code class="literal">CAIRO_PATTERN_TYPE_MESH</code></span></p></td>
+<td>The pattern is a mesh.
+</td>
+</tr>
</tbody>
</table></div>
<p class="since">Since 1.2</p>