Canvas background color



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


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 LinuxDAQ-Labs org

On 4/20/05, Richard Stellingwerff <remenic gmail com> wrote:
> On 4/18/05, KC <kcc1967 gmail com> 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? ;)
>



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