summaryrefslogtreecommitdiff
path: root/test/extend-reflect.c
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2007-03-05 19:22:41 -0500
committerBehdad Esfahbod <behdad@behdad.org>2007-03-05 19:23:10 -0500
commit393908c34dbf2484b811b84581984563a7115e38 (patch)
tree585eded129f7b3bd559d3aa19301a717e238f3e5 /test/extend-reflect.c
parent4716ed760c1cc8095587af130964fbc3432ed14d (diff)
downloadcairo-393908c34dbf2484b811b84581984563a7115e38.tar.gz
[test] Modify extend-reflect to need a smaller reference image
Diffstat (limited to 'test/extend-reflect.c')
-rw-r--r--test/extend-reflect.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/test/extend-reflect.c b/test/extend-reflect.c
index f9d2c4fe7..e23c8f67a 100644
--- a/test/extend-reflect.c
+++ b/test/extend-reflect.c
@@ -2,7 +2,6 @@
#include "cairo-test.h"
#include <stdio.h>
-#define SIZE 600
const char png_filename[] = "romedalen.png";
static cairo_test_draw_function_t draw;
@@ -10,22 +9,18 @@ static cairo_test_draw_function_t draw;
cairo_test_t test = {
"extend-reflect",
"Test CAIRO_EXTEND_REFLECT for surface patterns",
- SIZE, SIZE,
+ 256 + 32*2, 192 + 32*2,
draw
};
static cairo_test_status_t
draw (cairo_t *cr, int width, int height)
{
- cairo_pattern_t *pattern;
- cairo_set_source_rgba (cr, 0, 0, 0, 1);
- cairo_rectangle (cr, 0, 0, SIZE, SIZE);
- cairo_fill (cr);
-
- pattern = cairo_test_create_pattern_from_png (png_filename);
- cairo_pattern_set_extend (pattern, CAIRO_EXTEND_REFLECT);
- cairo_set_source (cr, pattern);
- cairo_pattern_destroy (pattern);
+ cairo_surface_t *surface;
+
+ surface = cairo_test_create_surface_from_png (png_filename);
+ cairo_set_source_surface (cr, surface, 32, 32);
+ cairo_pattern_set_extend (cairo_get_source (cr), CAIRO_EXTEND_REFLECT);
cairo_paint (cr);