[cairo] Question about draw colors on transparent gtk window

Kalle Vahlman kalle.vahlman at gmail.com
Thu Aug 9 01:23:04 PDT 2007


2007/8/9, Magicloud Magiclouds <magicloud.magiclouds at gmail.com>:
> Dear all,
>     I want to draw 8 lines of cpu usage on a transparent window on
> desktop with 8 colors.
>     The attachment is my c code. In line 27, I choose the color of the
> line with variable "i". If I fix the rgb values, like "1, 0, 0", then it
> draws lines in red. While I use dynamic colors, it only draws in white.
>     Why does this happen? Thanks.

Whitout the attachement it's hard to tell ;) but the symptoms sound
like the color values set are not within the expected 0.0...1.0 range
(but instead go over 1.0 and thus mean "full" for each component
resulting in white).

-- 
Kalle Vahlman, zuh at iki.fi
Powered by http://movial.fi
Interesting stuff at http://syslog.movial.fi


More information about the cairo mailing list