[Search for users]
[Overall Top Noters]
[List of all Conferences]
[Download this site]
Title: | DECWINDOWS 26-JAN-89 to 29-NOV-90 |
Notice: | See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit |
Moderator: | STAR::VATNE |
|
Created: | Mon Oct 30 1989 |
Last Modified: | Mon Dec 31 1990 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 3726 |
Total number of notes: | 19516 |
3562.0. "Firefox Color Problem" by TAV02::MELVYN (Why did I learn Computers ?) Thu Nov 01 1990 04:45
Dear All,
I have a customer who has a Firefox with 8 planes. He is having trouble
allocating certain colors.
The following code returns to him for both color "red" and "cyan" a color
pixel value of 10.
The RGB values however are returned from the parser correctly.
# include <stdio.h>
#include <decw$include/DwtAppl.h>
#define num_colors 2
main(argc,argv)
int argc; char argv[];
{
Display *display;
char *color_name[]={"red","cyan"};
XColor color;
int i;
display=XOpenDisplay(NULL);
for (i=0; i<num_colors; i++){
XParseColor(display,
DefaultColormap(display,DefaultScreen(display)),
color_name[i],
&color);
printf("color is %s \n",color_name[i]);
printf("color.red %d \n",color.red);
printf("color.green %d \n",color.green);
printf("color.blue %d \n",color.blue);
if (!XAllocColor(display,
DefaultColormap(display,DefaultScreen(display)),
&color)) {
printf("oops \n"); }
printf("color.pixel %ld \n",color.pixel);
printf("****************************************************\n");
}
}
I would appreciate any ideas. Cross posted in Firefox and Decwindows.
Thanks
Mel
T.R | Title | User | Personal Name | Date | Lines |
---|
3562.1 | | DECWIN::FISHER | I like my species the way it is" "A narrow view... | Wed Nov 07 1990 12:55 | 4 |
| It works fine on a GPX and an SPX. I don't happen to have an 8-plane ff,
though. I suggest a QAR.
Burns
|