Canvas background color

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

 



---------- Forwarded message ----------
From: KC <kcc1967@xxxxxxxxx>
Date: Apr 20, 2005 5:38 PM
Subject: Re: Canvas background color
To: Richard Stellingwerff <remenic@xxxxxxxxx>


Hi,

Thanks.  The API is easy but I think I'm confused by GdkColor.
The GdkColor is defined as

typedef struct {
    guint32 pixel;
    gunit16 red;
    guint16 green;
    guint16 blue;
} GdkColor;

What's purpose of GdkColor.pixel ?  Why it's 32 bits instead of
16*3 = 48 bits (for RGB) ?  When I try to set background color,
what value should I use for GdkColor.pixel ?

Thanks.
KC
kccheng@xxxxxxxxxxxxxxxxx

On 4/20/05, Richard Stellingwerff <remenic@xxxxxxxxx> wrote:
> On 4/18/05, KC <kcc1967@xxxxxxxxx> wrote:
> > Hi,
> >
> > How can I change background color of gnome canvas ?
> > I know I should probably use GtkStyle ... but I didn't success yet.
> > Any workable code example is appreciated.
>
> I'm not sure about GnomeCanvas, but normally you would use
> gtk_widget_modify_bg() and then use GTK_STATE_NORMAL as the state
> type.
>
> That's not that hard, is it? ;)
>
_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list


[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux