summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/main.c b/main.c
index 43bfb89..c76ebd2 100644
--- a/main.c
+++ b/main.c
@@ -31,6 +31,14 @@ main ()
while (1)
{
pixman_color_t color = { 0xffff, 0xabcd, 0x7777, 0xaaaa };
+ pixman_point_fixed_t p1 = { 0, 0 };
+ pixman_point_fixed_t p2 = { ws_window_get_width (window) << 16,
+ ws_window_get_height (window) << 16 };
+ pixman_gradient_stop_t stops[2] =
+ {
+ { pixman_int_to_fixed (0), { 0x2222, 0xeeee, 0xeeee, 0xeeee } },
+ { pixman_int_to_fixed (1), { 0xffff, 0x1111, 0x1111, 0x1111 } }
+ };
int fd = ws_get_fd (ws);
FD_ZERO (&set);
@@ -42,7 +50,7 @@ main ()
color.red = rand();
color.blue = rand();
- image = pixman_image_create_solid_fill (&color);
+ image = pixman_image_create_linear_gradient (&p1, &p2, stops, 2);
ws_window_copy_from_image (window, image, 0, 0, 0, 0,
ws_window_get_width (window),
ws_window_get_height (window));