summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAndrea Canciani <ranma42@gmail.com>2011-02-03 22:55:53 +0100
committerAndrea Canciani <ranma42@gmail.com>2011-02-07 20:28:09 +0100
commit5f039f0f894082c383884595220f6f0368ab72cf (patch)
tree4a77d3ac440d12e7138366d531ca7b1d85a9a6bd /test
parentfda784793edc3da789954df7fc2f0c86d9ed4f94 (diff)
mesh: Rename cairo_pattern_mesh_* functions to cairo_mesh_pattern_*
This is consistent with the naming of most cairo types/functions (example: cairo_foo_surface_*). The substitution in the code has been performed using: sed -i 's/cairo_pattern_mesh_/cairo_mesh_pattern_/' <files>
Diffstat (limited to 'test')
-rw-r--r--test/mesh-pattern-accuracy.c40
-rw-r--r--test/mesh-pattern-conical.c16
-rw-r--r--test/mesh-pattern-control-points.c52
-rw-r--r--test/mesh-pattern-fold.c30
-rw-r--r--test/mesh-pattern-overlap.c22
-rw-r--r--test/mesh-pattern-transformed.c44
-rw-r--r--test/mesh-pattern.c44
-rw-r--r--test/pattern-getters.c34
8 files changed, 141 insertions, 141 deletions
diff --git a/test/mesh-pattern-accuracy.c b/test/mesh-pattern-accuracy.c
index 0f756c57..92e15233 100644
--- a/test/mesh-pattern-accuracy.c
+++ b/test/mesh-pattern-accuracy.c
@@ -49,38 +49,38 @@ draw (cairo_t *cr, int width, int height)
pattern = cairo_pattern_create_mesh ();
- cairo_pattern_mesh_begin_patch (pattern);
+ cairo_mesh_pattern_begin_patch (pattern);
- cairo_pattern_mesh_move_to (pattern, 0, 0);
- cairo_pattern_mesh_line_to (pattern, 1, 0);
- cairo_pattern_mesh_line_to (pattern, 1, 1);
- cairo_pattern_mesh_line_to (pattern, 0, 1);
+ cairo_mesh_pattern_move_to (pattern, 0, 0);
+ cairo_mesh_pattern_line_to (pattern, 1, 0);
+ cairo_mesh_pattern_line_to (pattern, 1, 1);
+ cairo_mesh_pattern_line_to (pattern, 0, 1);
- cairo_pattern_mesh_set_corner_color_rgb (pattern, 0, 0, 0, 0);
- cairo_pattern_mesh_set_corner_color_rgb (pattern, 1, 1, 1, 1);
- cairo_pattern_mesh_set_corner_color_rgb (pattern, 2, 0, 0, 0);
- cairo_pattern_mesh_set_corner_color_rgb (pattern, 3, 1, 1, 1);
+ cairo_mesh_pattern_set_corner_color_rgb (pattern, 0, 0, 0, 0);
+ cairo_mesh_pattern_set_corner_color_rgb (pattern, 1, 1, 1, 1);
+ cairo_mesh_pattern_set_corner_color_rgb (pattern, 2, 0, 0, 0);
+ cairo_mesh_pattern_set_corner_color_rgb (pattern, 3, 1, 1, 1);
- cairo_pattern_mesh_end_patch (pattern);
+ cairo_mesh_pattern_end_patch (pattern);
- cairo_pattern_mesh_begin_patch (pattern);
+ cairo_mesh_pattern_begin_patch (pattern);
/* A small 1x1 red patch, that should be rendered as a 2x2 red
* square in the center of the image */
offset = 0.5 / SIZE;
- cairo_pattern_mesh_move_to (pattern, 0.5 + offset, 0.5 + offset);
- cairo_pattern_mesh_line_to (pattern, 0.5 + offset, 0.5 - offset);
- cairo_pattern_mesh_line_to (pattern, 0.5 - offset, 0.5 - offset);
- cairo_pattern_mesh_line_to (pattern, 0.5 - offset, 0.5 + offset);
+ cairo_mesh_pattern_move_to (pattern, 0.5 + offset, 0.5 + offset);
+ cairo_mesh_pattern_line_to (pattern, 0.5 + offset, 0.5 - offset);
+ cairo_mesh_pattern_line_to (pattern, 0.5 - offset, 0.5 - offset);
+ cairo_mesh_pattern_line_to (pattern, 0.5 - offset, 0.5 + offset);
- cairo_pattern_mesh_set_corner_color_rgb (pattern, 0, 1, 0, 0);
- cairo_pattern_mesh_set_corner_color_rgb (pattern, 1, 1, 0, 0);
- cairo_pattern_mesh_set_corner_color_rgb (pattern, 2, 1, 0, 0);
- cairo_pattern_mesh_set_corner_color_rgb (pattern, 3, 1, 0, 0);
+ cairo_mesh_pattern_set_corner_color_rgb (pattern, 0, 1, 0, 0);
+ cairo_mesh_pattern_set_corner_color_rgb (pattern, 1, 1, 0, 0);
+ cairo_mesh_pattern_set_corner_color_rgb (pattern, 2, 1, 0, 0);
+ cairo_mesh_pattern_set_corner_color_rgb (pattern, 3, 1, 0, 0);
- cairo_pattern_mesh_end_patch (pattern);
+ cairo_mesh_pattern_end_patch (pattern);
cairo_scale (cr, SIZE, SIZE);
diff --git a/test/mesh-pattern-conical.c b/test/mesh-pattern-conical.c
index aa3e182c..8138884e 100644
--- a/test/mesh-pattern-conical.c
+++ b/test/mesh-pattern-conical.c
@@ -62,14 +62,14 @@ sector_patch (cairo_pattern_t *pattern,
h = 4.0/3.0 * tan ((angle_B - angle_A) / 4.0);
- cairo_pattern_mesh_begin_patch (pattern);
+ cairo_mesh_pattern_begin_patch (pattern);
- cairo_pattern_mesh_move_to (pattern, CENTER_X, CENTER_Y);
- cairo_pattern_mesh_line_to (pattern,
+ cairo_mesh_pattern_move_to (pattern, CENTER_X, CENTER_Y);
+ cairo_mesh_pattern_line_to (pattern,
CENTER_X + r_cos_A,
CENTER_Y + r_sin_A);
- cairo_pattern_mesh_curve_to (pattern,
+ cairo_mesh_pattern_curve_to (pattern,
CENTER_X + r_cos_A - h * r_sin_A,
CENTER_Y + r_sin_A + h * r_cos_A,
CENTER_X + r_cos_B + h * r_sin_B,
@@ -77,11 +77,11 @@ sector_patch (cairo_pattern_t *pattern,
CENTER_X + r_cos_B,
CENTER_Y + r_sin_B);
- cairo_pattern_mesh_set_corner_color_rgb (pattern, 0, 1, 1, 1);
- cairo_pattern_mesh_set_corner_color_rgb (pattern, 1, A_r, A_g, A_b);
- cairo_pattern_mesh_set_corner_color_rgb (pattern, 2, B_r, B_g, B_b);
+ cairo_mesh_pattern_set_corner_color_rgb (pattern, 0, 1, 1, 1);
+ cairo_mesh_pattern_set_corner_color_rgb (pattern, 1, A_r, A_g, A_b);
+ cairo_mesh_pattern_set_corner_color_rgb (pattern, 2, B_r, B_g, B_b);
- cairo_pattern_mesh_end_patch (pattern);
+ cairo_mesh_pattern_end_patch (pattern);
}
static cairo_test_status_t
diff --git a/test/mesh-pattern-control-points.c b/test/mesh-pattern-control-points.c
index 54ff850e..4d594952 100644
--- a/test/mesh-pattern-control-points.c
+++ b/test/mesh-pattern-control-points.c
@@ -53,48 +53,48 @@ draw (cairo_t *cr, int width, int height)
cairo_translate (cr, PAD, PAD);
pattern = cairo_pattern_create_mesh ();
- cairo_pattern_mesh_begin_patch (pattern);
+ cairo_mesh_pattern_begin_patch (pattern);
- cairo_pattern_mesh_move_to (pattern, 0, 0);
- cairo_pattern_mesh_line_to (pattern, SIZE, 0);
- cairo_pattern_mesh_line_to (pattern, SIZE, SIZE);
- cairo_pattern_mesh_line_to (pattern, 0, SIZE);
+ cairo_mesh_pattern_move_to (pattern, 0, 0);
+ cairo_mesh_pattern_line_to (pattern, SIZE, 0);
+ cairo_mesh_pattern_line_to (pattern, SIZE, SIZE);
+ cairo_mesh_pattern_line_to (pattern, 0, SIZE);
- 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_mesh_pattern_set_corner_color_rgb (pattern, 0, 1, 0, 0);
+ cairo_mesh_pattern_set_corner_color_rgb (pattern, 1, 0, 1, 0);
+ cairo_mesh_pattern_set_corner_color_rgb (pattern, 2, 0, 0, 1);
+ cairo_mesh_pattern_set_corner_color_rgb (pattern, 3, 1, 1, 0);
- cairo_pattern_mesh_set_control_point (pattern, 0, SIZE * .7, SIZE * .7);
- cairo_pattern_mesh_set_control_point (pattern, 1, SIZE * .9, SIZE * .7);
- cairo_pattern_mesh_set_control_point (pattern, 2, SIZE * .9, SIZE * .9);
- cairo_pattern_mesh_set_control_point (pattern, 3, SIZE * .7, SIZE * .9);
+ cairo_mesh_pattern_set_control_point (pattern, 0, SIZE * .7, SIZE * .7);
+ cairo_mesh_pattern_set_control_point (pattern, 1, SIZE * .9, SIZE * .7);
+ cairo_mesh_pattern_set_control_point (pattern, 2, SIZE * .9, SIZE * .9);
+ cairo_mesh_pattern_set_control_point (pattern, 3, SIZE * .7, SIZE * .9);
- cairo_pattern_mesh_end_patch (pattern);
+ cairo_mesh_pattern_end_patch (pattern);
- cairo_pattern_mesh_begin_patch (pattern);
+ cairo_mesh_pattern_begin_patch (pattern);
- cairo_pattern_mesh_move_to (pattern, SIZE + PAD, 0);
- cairo_pattern_mesh_line_to (pattern, 2*SIZE + PAD, 0);
- cairo_pattern_mesh_line_to (pattern, 2*SIZE + PAD, SIZE);
- cairo_pattern_mesh_line_to (pattern, SIZE + PAD, SIZE);
+ cairo_mesh_pattern_move_to (pattern, SIZE + PAD, 0);
+ cairo_mesh_pattern_line_to (pattern, 2*SIZE + PAD, 0);
+ cairo_mesh_pattern_line_to (pattern, 2*SIZE + PAD, SIZE);
+ cairo_mesh_pattern_line_to (pattern, SIZE + PAD, SIZE);
- 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_mesh_pattern_set_corner_color_rgb (pattern, 0, 1, 0, 0);
+ cairo_mesh_pattern_set_corner_color_rgb (pattern, 1, 0, 1, 0);
+ cairo_mesh_pattern_set_corner_color_rgb (pattern, 2, 0, 0, 1);
+ cairo_mesh_pattern_set_corner_color_rgb (pattern, 3, 1, 1, 0);
- cairo_pattern_mesh_end_patch (pattern);
+ cairo_mesh_pattern_end_patch (pattern);
cairo_set_source (cr, pattern);
cairo_paint (cr);
/* mark the location of the control points */
cairo_set_source_rgb (cr, 0, 0, 0);
- cairo_pattern_mesh_get_patch_count (pattern, &num_patches);
+ cairo_mesh_pattern_get_patch_count (pattern, &num_patches);
for (i = 0; i < num_patches; i++) {
for (j = 0; j < 4; j++) {
- cairo_pattern_mesh_get_control_point (pattern, i, j, &x, &y);
+ cairo_mesh_pattern_get_control_point (pattern, i, j, &x, &y);
cairo_rectangle (cr, x - 5, y - 5, 10, 10);
cairo_fill (cr);
}
diff --git a/test/mesh-pattern-fold.c b/test/mesh-pattern-fold.c
index 586b0cd9..4872bc01 100644
--- a/test/mesh-pattern-fold.c
+++ b/test/mesh-pattern-fold.c
@@ -44,26 +44,26 @@ draw (cairo_t *cr, int width, int height)
pattern = cairo_pattern_create_mesh ();
- cairo_pattern_mesh_begin_patch (pattern);
+ cairo_mesh_pattern_begin_patch (pattern);
- cairo_pattern_mesh_move_to (pattern, 1, 1);
+ cairo_mesh_pattern_move_to (pattern, 1, 1);
- cairo_pattern_mesh_curve_to (pattern, 6, 0, -1, 0, 4, 1);
- cairo_pattern_mesh_curve_to (pattern, 5, 6, 5, -1, 4, 4);
- cairo_pattern_mesh_curve_to (pattern, -1, 3, 6, 3, 1, 4);
- cairo_pattern_mesh_curve_to (pattern, 2, -1, 2, 6, 1, 1);
+ cairo_mesh_pattern_curve_to (pattern, 6, 0, -1, 0, 4, 1);
+ cairo_mesh_pattern_curve_to (pattern, 5, 6, 5, -1, 4, 4);
+ cairo_mesh_pattern_curve_to (pattern, -1, 3, 6, 3, 1, 4);
+ cairo_mesh_pattern_curve_to (pattern, 2, -1, 2, 6, 1, 1);
- cairo_pattern_mesh_set_control_point (pattern, 0, 2, 3);
- cairo_pattern_mesh_set_control_point (pattern, 1, 3, 3);
- cairo_pattern_mesh_set_control_point (pattern, 2, 3, 2);
- cairo_pattern_mesh_set_control_point (pattern, 3, 2, 2);
+ cairo_mesh_pattern_set_control_point (pattern, 0, 2, 3);
+ cairo_mesh_pattern_set_control_point (pattern, 1, 3, 3);
+ cairo_mesh_pattern_set_control_point (pattern, 2, 3, 2);
+ cairo_mesh_pattern_set_control_point (pattern, 3, 2, 2);
- cairo_pattern_mesh_set_corner_color_rgb (pattern, 0, 1, 0, 0);
- cairo_pattern_mesh_set_corner_color_rgb (pattern, 1, 0, 0, 1);
- cairo_pattern_mesh_set_corner_color_rgb (pattern, 2, 0, 0, 0);
- cairo_pattern_mesh_set_corner_color_rgb (pattern, 3, 0, 1, 0);
+ cairo_mesh_pattern_set_corner_color_rgb (pattern, 0, 1, 0, 0);
+ cairo_mesh_pattern_set_corner_color_rgb (pattern, 1, 0, 0, 1);
+ cairo_mesh_pattern_set_corner_color_rgb (pattern, 2, 0, 0, 0);
+ cairo_mesh_pattern_set_corner_color_rgb (pattern, 3, 0, 1, 0);
- cairo_pattern_mesh_end_patch (pattern);
+ cairo_mesh_pattern_end_patch (pattern);
cairo_scale (cr, SIZE, SIZE);
diff --git a/test/mesh-pattern-overlap.c b/test/mesh-pattern-overlap.c
index 63cf0243..5ecbf9f6 100644
--- a/test/mesh-pattern-overlap.c
+++ b/test/mesh-pattern-overlap.c
@@ -46,20 +46,20 @@ draw (cairo_t *cr, int width, int height)
pattern = cairo_pattern_create_mesh ();
- cairo_pattern_mesh_begin_patch (pattern);
+ cairo_mesh_pattern_begin_patch (pattern);
- 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, 130, 140, 60, -40, 100, 100);
- cairo_pattern_mesh_curve_to (pattern, 60, 70, 30, 130, 0, 100);
- cairo_pattern_mesh_curve_to (pattern, -30, -40, 30, 140, 0, 0);
+ cairo_mesh_pattern_move_to (pattern, 0, 0);
+ cairo_mesh_pattern_curve_to (pattern, 30, -30, 60, 30, 100, 0);
+ cairo_mesh_pattern_curve_to (pattern, 130, 140, 60, -40, 100, 100);
+ cairo_mesh_pattern_curve_to (pattern, 60, 70, 30, 130, 0, 100);
+ cairo_mesh_pattern_curve_to (pattern, -30, -40, 30, 140, 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_mesh_pattern_set_corner_color_rgb (pattern, 0, 1, 0, 0);
+ cairo_mesh_pattern_set_corner_color_rgb (pattern, 1, 0, 1, 0);
+ cairo_mesh_pattern_set_corner_color_rgb (pattern, 2, 0, 0, 1);
+ cairo_mesh_pattern_set_corner_color_rgb (pattern, 3, 1, 1, 0);
- cairo_pattern_mesh_end_patch (pattern);
+ cairo_mesh_pattern_end_patch (pattern);
cairo_set_source (cr, pattern);
cairo_paint (cr);
diff --git a/test/mesh-pattern-transformed.c b/test/mesh-pattern-transformed.c
index 278e4a8c..a5c20e75 100644
--- a/test/mesh-pattern-transformed.c
+++ b/test/mesh-pattern-transformed.c
@@ -48,38 +48,38 @@ draw (cairo_t *cr, int width, int height)
pattern = cairo_pattern_create_mesh ();
- cairo_pattern_mesh_begin_patch (pattern);
+ cairo_mesh_pattern_begin_patch (pattern);
- 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_mesh_pattern_move_to (pattern, 0, 0);
+ cairo_mesh_pattern_curve_to (pattern, 30, -30, 60, 30, 100, 0);
+ cairo_mesh_pattern_curve_to (pattern, 60, 30, 130, 60, 100, 100);
+ cairo_mesh_pattern_curve_to (pattern, 60, 70, 30, 130, 0, 100);
+ cairo_mesh_pattern_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_mesh_pattern_set_corner_color_rgb (pattern, 0, 1, 0, 0);
+ cairo_mesh_pattern_set_corner_color_rgb (pattern, 1, 0, 1, 0);
+ cairo_mesh_pattern_set_corner_color_rgb (pattern, 2, 0, 0, 1);
+ cairo_mesh_pattern_set_corner_color_rgb (pattern, 3, 1, 1, 0);
- cairo_pattern_mesh_end_patch (pattern);
+ cairo_mesh_pattern_end_patch (pattern);
- cairo_pattern_mesh_begin_patch (pattern);
+ cairo_mesh_pattern_begin_patch (pattern);
- cairo_pattern_mesh_move_to (pattern, 50, 50);
- cairo_pattern_mesh_curve_to (pattern, 80, 20, 110, 80, 150, 50);
+ cairo_mesh_pattern_move_to (pattern, 50, 50);
+ cairo_mesh_pattern_curve_to (pattern, 80, 20, 110, 80, 150, 50);
- cairo_pattern_mesh_curve_to (pattern, 110, 80, 180, 110, 150, 150);
+ cairo_mesh_pattern_curve_to (pattern, 110, 80, 180, 110, 150, 150);
- cairo_pattern_mesh_curve_to (pattern, 110, 120, 80, 180, 50, 150);
+ cairo_mesh_pattern_curve_to (pattern, 110, 120, 80, 180, 50, 150);
- cairo_pattern_mesh_curve_to (pattern, 80, 120, 20, 80, 50, 50);
+ cairo_mesh_pattern_curve_to (pattern, 80, 120, 20, 80, 50, 50);
- cairo_pattern_mesh_set_corner_color_rgba (pattern, 0, 1, 0, 0, 0.3);
- cairo_pattern_mesh_set_corner_color_rgb (pattern, 1, 0, 1, 0);
- cairo_pattern_mesh_set_corner_color_rgba (pattern, 2, 0, 0, 1, 0.3);
- cairo_pattern_mesh_set_corner_color_rgb (pattern, 3, 1, 1, 0);
+ cairo_mesh_pattern_set_corner_color_rgba (pattern, 0, 1, 0, 0, 0.3);
+ cairo_mesh_pattern_set_corner_color_rgb (pattern, 1, 0, 1, 0);
+ cairo_mesh_pattern_set_corner_color_rgba (pattern, 2, 0, 0, 1, 0.3);
+ cairo_mesh_pattern_set_corner_color_rgb (pattern, 3, 1, 1, 0);
- cairo_pattern_mesh_end_patch (pattern);
+ cairo_mesh_pattern_end_patch (pattern);
cairo_scale (cr, .5, .5);
diff --git a/test/mesh-pattern.c b/test/mesh-pattern.c
index bcd49be2..68f18304 100644
--- a/test/mesh-pattern.c
+++ b/test/mesh-pattern.c
@@ -49,35 +49,35 @@ draw (cairo_t *cr, int width, int height)
pattern = cairo_pattern_create_mesh ();
- cairo_pattern_mesh_begin_patch (pattern);
+ cairo_mesh_pattern_begin_patch (pattern);
- 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_mesh_pattern_move_to (pattern, 0, 0);
+ cairo_mesh_pattern_curve_to (pattern, 30, -30, 60, 30, 100, 0);
+ cairo_mesh_pattern_curve_to (pattern, 60, 30, 130, 60, 100, 100);
+ cairo_mesh_pattern_curve_to (pattern, 60, 70, 30, 130, 0, 100);
+ cairo_mesh_pattern_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_mesh_pattern_set_corner_color_rgb (pattern, 0, 1, 0, 0);
+ cairo_mesh_pattern_set_corner_color_rgb (pattern, 1, 0, 1, 0);
+ cairo_mesh_pattern_set_corner_color_rgb (pattern, 2, 0, 0, 1);
+ cairo_mesh_pattern_set_corner_color_rgb (pattern, 3, 1, 1, 0);
- cairo_pattern_mesh_end_patch (pattern);
+ cairo_mesh_pattern_end_patch (pattern);
- cairo_pattern_mesh_begin_patch (pattern);
+ cairo_mesh_pattern_begin_patch (pattern);
- cairo_pattern_mesh_move_to (pattern, 50, 50);
- cairo_pattern_mesh_curve_to (pattern, 80, 20, 110, 80, 150, 50);
- cairo_pattern_mesh_curve_to (pattern, 110, 80, 180, 110, 150, 150);
- cairo_pattern_mesh_curve_to (pattern, 110, 120, 80, 180, 50, 150);
- cairo_pattern_mesh_curve_to (pattern, 80, 120, 20, 80, 50, 50);
+ cairo_mesh_pattern_move_to (pattern, 50, 50);
+ cairo_mesh_pattern_curve_to (pattern, 80, 20, 110, 80, 150, 50);
+ cairo_mesh_pattern_curve_to (pattern, 110, 80, 180, 110, 150, 150);
+ cairo_mesh_pattern_curve_to (pattern, 110, 120, 80, 180, 50, 150);
+ cairo_mesh_pattern_curve_to (pattern, 80, 120, 20, 80, 50, 50);
- cairo_pattern_mesh_set_corner_color_rgba (pattern, 0, 1, 0, 0, 0.3);
- cairo_pattern_mesh_set_corner_color_rgb (pattern, 1, 0, 1, 0);
- cairo_pattern_mesh_set_corner_color_rgba (pattern, 2, 0, 0, 1, 0.3);
- cairo_pattern_mesh_set_corner_color_rgb (pattern, 3, 1, 1, 0);
+ cairo_mesh_pattern_set_corner_color_rgba (pattern, 0, 1, 0, 0, 0.3);
+ cairo_mesh_pattern_set_corner_color_rgb (pattern, 1, 0, 1, 0);
+ cairo_mesh_pattern_set_corner_color_rgba (pattern, 2, 0, 0, 1, 0.3);
+ cairo_mesh_pattern_set_corner_color_rgb (pattern, 3, 1, 1, 0);
- cairo_pattern_mesh_end_patch (pattern);
+ cairo_mesh_pattern_end_patch (pattern);
cairo_set_source (cr, pattern);
cairo_paint (cr);
diff --git a/test/pattern-getters.c b/test/pattern-getters.c
index 2d7d9048..da56db4b 100644
--- a/test/pattern-getters.c
+++ b/test/pattern-getters.c
@@ -189,7 +189,7 @@ draw (cairo_t *cr, int width, int height)
int i;
pat = cairo_pattern_create_mesh ();
- status = cairo_pattern_mesh_get_patch_count (pat, &count);
+ status = cairo_mesh_pattern_get_patch_count (pat, &count);
CHECK_SUCCESS;
if (count != 0) {
@@ -197,13 +197,13 @@ draw (cairo_t *cr, int width, int height)
return CAIRO_TEST_FAILURE;
}
- cairo_pattern_mesh_begin_patch (pat);
- cairo_pattern_mesh_move_to (pat, 0, 0);
- cairo_pattern_mesh_line_to (pat, 0, 3);
- cairo_pattern_mesh_line_to (pat, 3, 3);
- cairo_pattern_mesh_line_to (pat, 3, 0);
+ cairo_mesh_pattern_begin_patch (pat);
+ cairo_mesh_pattern_move_to (pat, 0, 0);
+ cairo_mesh_pattern_line_to (pat, 0, 3);
+ cairo_mesh_pattern_line_to (pat, 3, 3);
+ cairo_mesh_pattern_line_to (pat, 3, 0);
- status = cairo_pattern_mesh_get_patch_count (pat, &count);
+ status = cairo_mesh_pattern_get_patch_count (pat, &count);
CHECK_SUCCESS;
if (count != 0) {
@@ -211,9 +211,9 @@ draw (cairo_t *cr, int width, int height)
return CAIRO_TEST_FAILURE;
}
- cairo_pattern_mesh_end_patch (pat);
+ cairo_mesh_pattern_end_patch (pat);
- status = cairo_pattern_mesh_get_patch_count (pat, &count);
+ status = cairo_mesh_pattern_get_patch_count (pat, &count);
CHECK_SUCCESS;
if (count != 1) {
@@ -226,7 +226,7 @@ draw (cairo_t *cr, int width, int height)
double cp_y[4] = { 1, 2, 2, 1 };
double x, y;
- status = cairo_pattern_mesh_get_control_point (pat, 0, i, &x, &y);
+ status = cairo_mesh_pattern_get_control_point (pat, 0, i, &x, &y);
CHECK_SUCCESS;
if (!CAIRO_TEST_DOUBLE_EQUALS(x,cp_x[i]) ||
@@ -237,18 +237,18 @@ draw (cairo_t *cr, int width, int height)
}
}
- cairo_pattern_mesh_begin_patch (pat);
- cairo_pattern_mesh_move_to (pat, 0, 0);
- cairo_pattern_mesh_line_to (pat, 1, 0);
- cairo_pattern_mesh_line_to (pat, 1, 1);
- cairo_pattern_mesh_set_corner_color_rgb (pat, 0, 1, 1, 1);
- cairo_pattern_mesh_end_patch (pat);
+ cairo_mesh_pattern_begin_patch (pat);
+ cairo_mesh_pattern_move_to (pat, 0, 0);
+ cairo_mesh_pattern_line_to (pat, 1, 0);
+ cairo_mesh_pattern_line_to (pat, 1, 1);
+ cairo_mesh_pattern_set_corner_color_rgb (pat, 0, 1, 1, 1);
+ cairo_mesh_pattern_end_patch (pat);
for (i = 0; i < 4; i++) {
double corner_color[4] = { 1, 0, 0, 1 };
double a, r, g, b;
- status = cairo_pattern_mesh_get_corner_color_rgba (pat, 1, i,
+ status = cairo_mesh_pattern_get_corner_color_rgba (pat, 1, i,
&r, &g, &b, &a);
CHECK_SUCCESS;