2005-10-09 14:51:55 +00:00
|
|
|
#include <math.h>
|
|
|
|
|
#include "cairo-test.h"
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
|
|
const char png_filename[] = "romedalen.png";
|
|
|
|
|
|
2006-07-13 12:58:24 -04:00
|
|
|
static cairo_test_draw_function_t draw;
|
|
|
|
|
|
2005-10-09 14:51:55 +00:00
|
|
|
cairo_test_t test = {
|
|
|
|
|
"extend-reflect",
|
2007-02-21 18:16:34 -05:00
|
|
|
"Test CAIRO_EXTEND_REFLECT for surface patterns",
|
2007-03-05 19:22:41 -05:00
|
|
|
256 + 32*2, 192 + 32*2,
|
2006-07-11 22:19:39 -04:00
|
|
|
draw
|
2005-10-09 14:51:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static cairo_test_status_t
|
|
|
|
|
draw (cairo_t *cr, int width, int height)
|
|
|
|
|
{
|
2007-03-05 19:22:41 -05:00
|
|
|
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);
|
2005-10-09 14:51:55 +00:00
|
|
|
|
|
|
|
|
cairo_paint (cr);
|
|
|
|
|
|
|
|
|
|
return CAIRO_TEST_SUCCESS;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int
|
|
|
|
|
main (void)
|
|
|
|
|
{
|
2006-07-11 22:19:39 -04:00
|
|
|
return cairo_test (&test);
|
2005-10-09 14:51:55 +00:00
|
|
|
}
|