Re: Xcms
- From: Owen Taylor <otaylor gtk org>
- To: Karl Nelson <kenelson ece ucdavis edu>
- Cc: gtk-list redhat com
- Subject: Re: Xcms
- Date: 14 Jun 1998 23:16:51 -0400
Karl Nelson <kenelson@ece.ucdavis.edu> writes:
> I agree that most of the functionallity of Xcms is very overkill.
> However in an example code that I recently sent, I needed at
> minumum XcmsLookupColor. When interfacing between various toolkits
> it is very nice to have some function to convert between color
> maps and lookup color values. OpenGL (in my case) provides no
> named color scheme. I could use XLookupColor, but I don't know
> if gdk provides that either (but it would be more difficult).
There is no need for Xcms for using the names in the X rgb
data base.
GdkColor &red;
gdk_color_parse("red", &color);
printf("Red is (%d, %d, %d)", color->red, color->green, color->blue);
gdk_color_alloc (gtk_widget_get_colormap (widget), color);
gdk_gc_set_foreground (some_gc, red);
Etc. All works fine now. (gdk_color_parse() is the GDK frontend
to XLookupColor.)
> How poorly supported it Xcms? (Should I avoid it like the plague?)
I think (but am not sure) that it is an X11R6 feature. So it won't be
supported on X11R5 boxes. Even on an X11R6 is a difference between
having the interfaces there and having them be actually useful for
color correction. To do accurate color display, you need device
profiles, and I don't know how that is supposed to work with say
XFree86.
(AcceleratedX does set the XDCC root window property for Xcms -
I don't know if the settings it uses have any relation to reality
or not)
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]