16b08c1550ff3582aae60e0fbaa5b8bfe0ae4ebd
[framework/graphics/cairo.git] / test / extend-reflect.c
1 #include <math.h>
2 #include "cairo-test.h"
3 #include <stdio.h>
4
5 static const char *png_filename = "romedalen.png";
6
7 static cairo_test_status_t
8 draw (cairo_t *cr, int width, int height)
9 {
10     const cairo_test_context_t *ctx = cairo_test_get_context (cr);
11     cairo_surface_t *surface;
12
13     surface = cairo_test_create_surface_from_png (ctx, png_filename);
14     cairo_set_source_surface (cr, surface, 32, 32);
15     cairo_pattern_set_extend (cairo_get_source (cr), CAIRO_EXTEND_REFLECT);
16
17     cairo_paint (cr);
18
19     cairo_surface_destroy (surface);
20
21     return CAIRO_TEST_SUCCESS;
22 }
23
24 CAIRO_TEST (extend_reflect,
25             "Test CAIRO_EXTEND_REFLECT for surface patterns",
26             "extend", /* keywords */
27             NULL, /* requirements */
28             256 + 32*2, 192 + 32*2,
29             NULL, draw)