Re: Changing the background color of a window
- From: Havoc Pennington <hp redhat com>
- To: José Vitor de Santana <jvictor mail com>
- Cc: gtk-list gnome org
- Subject: Re: Changing the background color of a window
- Date: Wed, 26 Feb 2003 01:28:37 -0500
On Tue, Feb 25, 2003 at 11:14:32PM -0500, José Vitor de Santana wrote:
> But indeed it must have been parsed by
> gdk_color_parse before feeding it to
> gtk_widget_modify_bg. That's what I found.
No, definitely gdk_color_parse isn't required.
All gdk_color_parse does is fill in color.red, color.green,
color.blue, which you already did.
> red = g_rand_int_range(my_rand,0,65536);
> green = g_rand_int_range(my_rand,0,65536);
> blue = g_rand_int_range(my_rand,0,65536);
> rgb=g_strdup_printf("#%02X%02X%02X",
> red,green,blue);
>
> gdk_color_parse(rgb,&color);
Definitely the printf/parse here is not needed.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]