Re: [gtk-list] Re: how to convert windows RGB color to GdkColor



>  > Now I work on the Linux and I found that the GdkColor also has the same
>  > structures RGB, but the difference is that each value is between 0 and
>  > 65535.  I wonder whether there is a way to convert the windows RGB color
>  > to GdkColor?
>  
>  Multiply by 256?!

This is not enough.  You then need to add the original value.  I.e. 

	new_value = (old_value << 8) + old_value;

Assuming old_value is in [0, 255].

  Federico



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]