2009-11-17 Jeffrey Stedfast <fejj@novell.com>
[moon.git] / cairo / test / extend-repeat.c
blob32c43a5399200ed035f881f57d016ddfec8f0984
1 #include "cairo-test.h"
3 const char png_filename[] = "romedalen.png";
5 static cairo_test_draw_function_t draw;
7 static const cairo_test_t test = {
8 "extend-repeat",
9 "Test CAIRO_EXTEND_REPEAT for surface patterns",
10 256 + 32*2, 192 + 32*2,
11 draw
14 static cairo_test_status_t
15 draw (cairo_t *cr, int width, int height)
17 const cairo_test_context_t *ctx = cairo_test_get_context (cr);
18 cairo_surface_t *surface;
20 surface = cairo_test_create_surface_from_png (ctx, png_filename);
21 cairo_set_source_surface (cr, surface, 32, 32);
22 cairo_pattern_set_extend (cairo_get_source (cr), CAIRO_EXTEND_REPEAT);
24 cairo_paint (cr);
26 cairo_surface_destroy (surface);
28 return CAIRO_TEST_SUCCESS;
31 int
32 main (void)
34 return cairo_test (&test);