diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2018-07-10 23:05:17 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2018-07-10 23:05:17 +0200 |
commit | c120c7bcbcf115ecc2a6668f4c7f45b3d4a5bc86 (patch) | |
tree | 5550610553d1b1d7236d052b6e956b22e0bb4883 /app/wlib/gtklib/gtkdraw-cairo.c | |
parent | 67d0ce65dc6a1d240e271a7cd479b60aa1dc2967 (diff) | |
parent | 26d299964db18cb71c2c6a5be4864479ba82d54f (diff) |
Merge branch 'release/debian/5.1.1-1'debian/5.1.1-1
Diffstat (limited to 'app/wlib/gtklib/gtkdraw-cairo.c')
-rw-r--r-- | app/wlib/gtklib/gtkdraw-cairo.c | 8 |
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); } |