Re: [gtk-list] Re: Help with GtkColor
- From: Adrian Feiguin <feiguin ifir ifir edu ar>
- To: "José Miguel R. Barrientos" <jmiguel ceselsa es>
- cc: Justin Zaun <jzaun telerama com>, gtk-list redhat com
- Subject: Re: [gtk-list] Re: Help with GtkColor
- Date: Thu, 20 May 1999 12:53:59 +0000 (GMT)
On Thu, 20 May 1999, [iso-8859-1] José Miguel R. Barrientos wrote:
> Justin Zaun wrote:
> >
> > Justin Zaun wrote:
> > >
> > > How do I convert a GtkColor into an XPixel? It is very important that the
> > > colors match exactly, and it must work in all color depths. Any help will
> > > be very appreciated.
> > > Justin
> > >
> > > --
> > > To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com <
> > /dev/null
> >
> > XColor and GdkColor, both have red, green and blue fields, and are
> > identical.
> >
> > Not real up on X, but the function I'm calling is expecting a XPixel color
> > a number from 0-12345 (or some number, can't remember right now). Its the
> > acual color of the pixel, not the RGB values... This value is neaded to be
> > sent directly to the tuner hardware...
> > Thanks,
> > Justin
>
>
> Ok, the pixel value is an index into a ColorMap. GdkColorMap and XColorMap have
> the same entries.
> Any operation involving color in Gdk must manage a ColorMap. This colormap
> matches the X colormap.
>
>
> Regards,
>
> - José Miguel
Just let me add that you can set the pixel value using
gdk_color_alloc(colormap, &color)
for example : gdk_color_alloc(gtk_widget_get_colormap(widget), &color)
this looks for the best match in the given colormap.
you can set rgb values by hand, or with gdk_color_parse.
Regards,
<ADRIAN>
>
> --
> 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]