4 #include "../test/utils.h"
8 main (int argc, char **argv)
14 { pixman_double_to_fixed ((x)), pixman_double_to_fixed ((y)) }
16 pixman_image_t *src_img, *dest_img;
17 pixman_triangle_t tris[4] =
19 { POINT (100, 100), POINT (10, 50), POINT (110, 10) },
20 { POINT (100, 100), POINT (150, 10), POINT (200, 50) },
21 { POINT (100, 100), POINT (10, 170), POINT (90, 175) },
22 { POINT (100, 100), POINT (170, 150), POINT (120, 190) },
24 pixman_color_t color = { 0x4444, 0x4444, 0xffff, 0xffff };
25 uint32_t *bits = malloc (WIDTH * HEIGHT * 4);
28 for (i = 0; i < WIDTH * HEIGHT; ++i)
29 bits[i] = (i / HEIGHT) * 0x01010000;
31 src_img = pixman_image_create_solid_fill (&color);
32 dest_img = pixman_image_create_bits (PIXMAN_a8r8g8b8, WIDTH, HEIGHT, bits, WIDTH * 4);
34 pixman_composite_triangles (PIXMAN_OP_ATOP_REVERSE,
40 ARRAY_LENGTH (tris), tris);
41 show_image (dest_img);
43 pixman_image_unref (src_img);
44 pixman_image_unref (dest_img);