From 92248e6e133da080e078f0eda306b9482fd1636a Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Mon, 16 Nov 2015 21:05:41 +0100 Subject: [PATCH] (Hopefull) fix #259, color offset by 1 --- source/x11-helper.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/x11-helper.c b/source/x11-helper.c index 68bfe3a8..a602c9a5 100644 --- a/source/x11-helper.c +++ b/source/x11-helper.c @@ -559,10 +559,10 @@ unsigned int color_get ( Display *display, const char *const name, const char * void x11_helper_set_cairo_rgba ( cairo_t *d, unsigned int pixel ) { cairo_set_source_rgba ( d, - ( ( pixel & 0x00FF0000 ) >> 16 ) / 256.0, - ( ( pixel & 0x0000FF00 ) >> 8 ) / 256.0, - ( ( pixel & 0x000000FF ) >> 0 ) / 256.0, - ( ( pixel & 0xFF000000 ) >> 24 ) / 256.0 + ( ( pixel & 0x00FF0000 ) >> 16 ) / 255.0, + ( ( pixel & 0x0000FF00 ) >> 8 ) / 255.0, + ( ( pixel & 0x000000FF ) >> 0 ) / 255.0, + ( ( pixel & 0xFF000000 ) >> 24 ) / 255.0 ); } /**