summaryrefslogtreecommitdiff
path: root/app/wlib/gtklib/gtkdraw-cairo.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2018-05-05 18:22:00 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2018-05-05 18:22:00 +0200
commit9a1d6eded2750572e9f5f79e53ec507dd7a06ba5 (patch)
tree10d84c82031aace7ac819f27116a04e7da238d59 /app/wlib/gtklib/gtkdraw-cairo.c
parentd1a8285f818eb7e5c3d6a05709ea21a808490b8c (diff)
New upstream version 5.1.1upstream/5.1.1
Diffstat (limited to 'app/wlib/gtklib/gtkdraw-cairo.c')
-rw-r--r--app/wlib/gtklib/gtkdraw-cairo.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/wlib/gtklib/gtkdraw-cairo.c b/app/wlib/gtklib/gtkdraw-cairo.c
index 4f3b1d2..8672523 100644
--- a/app/wlib/gtklib/gtkdraw-cairo.c
+++ b/app/wlib/gtklib/gtkdraw-cairo.c
@@ -188,8 +188,12 @@ static cairo_t* gtkDrawCreateCairoContext(
}
else
{
- GdkColor* const gcolor = wlibGetColor(color, TRUE);
- cairo_set_source_rgb(cairo, gcolor->red / 65535.0, gcolor->green / 65535.0, gcolor->blue / 65535.0);
+ long rgbcolor = wDrawGetRGB(color);
+ int r0, g0, b0;
+ r0 = (int)(rgbcolor>>16)&0xFF;
+ g0 = (int)(rgbcolor>>8)&0xFF;
+ b0 = (int)(rgbcolor)&0xFF;
+ cairo_set_source_rgb(cairo, r0/255.0, g0/255.0, b0/255.0);
cairo_set_operator(cairo, CAIRO_OPERATOR_SOURCE);
}