Fix colors off by one

This commit is contained in:
Mikkel Oscar Lyderik 2016-01-25 01:10:41 +01:00
parent 55ac868898
commit 96935f2682

View file

@ -17,10 +17,10 @@ static int ws_spacing = 1;
static void cairo_set_source_u32(cairo_t *cairo, uint32_t color) { static void cairo_set_source_u32(cairo_t *cairo, uint32_t color) {
cairo_set_source_rgba(cairo, cairo_set_source_rgba(cairo,
((color & 0xFF000000) >> 24) / 256.0, ((color & 0xFF000000) >> 24) / 255.0,
((color & 0xFF0000) >> 16) / 256.0, ((color & 0xFF0000) >> 16) / 255.0,
((color & 0xFF00) >> 8) / 256.0, ((color & 0xFF00) >> 8) / 255.0,
(color & 0xFF) / 256.0); (color & 0xFF) / 255.0);
} }
/** /**