From: Søren Sandmann Pedersen Date: Wed, 6 Oct 2010 07:56:55 +0000 (-0400) Subject: composite-test.c: Use similar gradient to the one in the PDF spec. X-Git-Tag: pixman-0.25.6~37 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3aa45d62e45f40faa98f9bb47046578bf19e7574;p=platform%2Fupstream%2Fpixman.git composite-test.c: Use similar gradient to the one in the PDF spec. --- diff --git a/demos/composite-test.c b/demos/composite-test.c index bba90c5..f6c3804 100644 --- a/demos/composite-test.c +++ b/demos/composite-test.c @@ -4,8 +4,8 @@ #include "pixman.h" #include "gtk-utils.h" -#define WIDTH 60 -#define HEIGHT 60 +#define WIDTH 80 +#define HEIGHT 80 typedef struct { const char *name; @@ -94,19 +94,19 @@ main (int argc, char **argv) uint32_t *src = malloc (WIDTH * HEIGHT * 4); pixman_image_t *src_img; pixman_image_t *dest_img; - pixman_point_fixed_t p1 = { -10 << 0, 0 }; - pixman_point_fixed_t p2 = { WIDTH << 16, (HEIGHT - 10) << 16 }; + pixman_point_fixed_t p1 = { -10 << 16, 10 << 16 }; + pixman_point_fixed_t p2 = { (WIDTH + 10) << 16, (HEIGHT - 10) << 16 }; uint16_t full = 0xcfff; uint16_t low = 0x5000; uint16_t alpha = 0xffff; pixman_gradient_stop_t stops[6] = { - { d2f (0.0), { full, low, low, alpha } }, - { d2f (0.25), { full, full, low, alpha } }, - { d2f (0.4), { low, full, low, alpha } }, - { d2f (0.6), { low, full, full, alpha } }, - { d2f (0.8), { low, low, full, alpha } }, - { d2f (1.0), { full, low, full, alpha } }, + { d2f (0.0), { 0xf2f2, 0x8787, 0x7d7d, alpha } }, + { d2f (0.22), { 0xf3f3, 0xeaea, 0x8383, alpha } }, + { d2f (0.42), { 0x6b6b, 0xc0c0, 0x7777, alpha } }, + { d2f (0.57), { 0x4b4b, 0xc9c9, 0xf5f5, alpha } }, + { d2f (0.75), { 0x6a6a, 0x7f7f, 0xbebe, alpha } }, + { d2f (1.0), { 0xeded, 0x8282, 0xb0b0, alpha } }, }; int i;