1 #include "../test/utils.h"
8 main (int argc, char **argv)
10 pixman_image_t *src_img, *dest_img;
11 pixman_gradient_stop_t stops[] = {
12 { 0x00000, { 0x0000, 0x0000, 0x4444, 0xdddd } },
13 { 0x10000, { 0xeeee, 0xeeee, 0x8888, 0xdddd } },
15 /* These colors make it very obvious that dithering
16 * is useful even for 8-bit gradients
18 { 0x00000, { 0x6666, 0x3333, 0x3333, 0xffff } },
19 { 0x10000, { 0x3333, 0x6666, 0x6666, 0xffff } },
22 pixman_point_fixed_t p1, p2;
24 enable_divbyzero_exceptions ();
26 dest_img = pixman_image_create_bits (PIXMAN_x8r8g8b8,
34 src_img = pixman_image_create_linear_gradient (&p1, &p2, stops, ARRAY_LENGTH (stops));
36 pixman_image_composite32 (PIXMAN_OP_OVER,
45 show_image (dest_img);
47 pixman_image_unref (dest_img);