[cairo] Question about draw colors on transparent gtk window

Magicloud Magiclouds magicloud.magiclouds at gmail.com
Thu Aug 9 01:40:19 PDT 2007


Kalle Vahlman wrote:
> 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).
> 
Oh, I am really sorry. Here is it.
I have printed the rgb values out, and they were between 0 and 1.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: main.c
Type: text/x-csrc
Size: 4419 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20070809/9e7d982d/attachment.c 


More information about the cairo mailing list