Re: [gtk-list] Re: how to change the color of a GdkGC



You also have a couple of typos, which
hopefully are just in transcribing to the
email message:
1st is
> > GdkColor color1={0,0xff00,0x0909,0x,0909};
                                                                       ^
here
2nd is
> > gdk_gc_set_foreground(gc,color1);
                                                       ^ should be &color1
Donna

> Jiang XU wrote:
> >
> > I don't know why?
> >
> > GdkGC *gc;
> > GdkColor color1={0,0xff00,0x0909,0x,0909};
> >
> > gc=gdk_gc_new(drawable);
>
>   I don't have a lot of experience with GTK but maybe adding this will
> help:
>
> gdk_color_alloc(gtk_widget_get_colormap(widget), &color1);
>
> > gdk_gc_set_foreground(gc,color1);
> > gdk_draw_rectangle(drawable,gc,.....);
>
> Leonardo
>
> --
> To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com <
/dev/null
>
>
>



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