# To subscribers of the xforms list from yann.guichoux@ago.fr :
Angus Leeming wrote:
> # To subscribers of the xforms list from Angus Leeming <a.leeming@ic.ac.uk> :
>
> To set an xforms color
> int r, g, b /* 0 < r,g,b < 255 */
> fl_mapcolor( FL_FREE_COL4, r, g, b );
> To extract an xforms color
> fl_getmcolor( FL_FREE_COL4, &r, &g, &b);
>
> Angus
the problem is that a pixel value obtained with XGetPixel() does not correspond
to an indice in the xforms' internal colormap...
I can't use fl_getmcolor(Pixel, &r,&g,&b) :-(
cheers
Yann
>
> >
> > does anyone know the way to get an rgb triplet (from the xforms internal
> > colormap) corresponding to a pixel value (obtained with XGetPixel()) ?
> > (whatever the visual depth is...(8,16,24,32 bits))
> > or to know the color indice in the xforms colormap corresponding to this
> > pixel value.
> > (there is a fl_get_pixel(FL_COLOR) function...is there a simple way to
> > make a "fl_get_colorIndice(unsigned long Pixel)" function ???)
> >
> > thanks for any help.
> >
> > Yann
> > _________________________________________________
> > To unsubscribe, send the message "unsubscribe" to
> > xforms-request@bob.usuhs.mil or see
> > http://bob.usuhs.mil/mailserv/xforms.html
> > XForms Home Page: http://world.std.com/~xforms
> > List Archive: http://bob.usuhs.mil/mailserv/list-archives/
> _________________________________________________
> To unsubscribe, send the message "unsubscribe" to
> xforms-request@bob.usuhs.mil or see
> http://bob.usuhs.mil/mailserv/xforms.html
> XForms Home Page: http://world.std.com/~xforms
> List Archive: http://bob.usuhs.mil/mailserv/list-archives/
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuhs.mil or see
http://bob.usuhs.mil/mailserv/xforms.html
XForms Home Page: http://world.std.com/~xforms
List Archive: http://bob.usuhs.mil/mailserv/list-archives/
This archive was generated by hypermail 2b29 : Fri Nov 17 2000 - 01:58:11 EST