diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2018-05-05 19:24:29 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2018-05-05 19:24:29 +0200 |
commit | 81184b836a6ddbeaca5f85781a052cb36424e37f (patch) | |
tree | 1965bd34b4e351e5148a1412e618555b72330117 /app/wlib/gtklib/gtkdraw-cairo.c | |
parent | 67d0ce65dc6a1d240e271a7cd479b60aa1dc2967 (diff) | |
parent | c1f7a0251136f6327d14a85eb5a761489551b668 (diff) |
Merge branch 'feature/upstream' into develop
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); } |