Hi, I used GRX with DJGPP on DOS for a while (years ago) and was very happy with it, now I'd like to use it on Linux but I am having a few problems. Compiling and installing was easy and most of the test programs work without problems, but...
Is there an archive of this list so I can check if this topic has been discussed before? Or someone can point me to a site that discuss this or has examples written for Linux and X11, if it exists?
If the above is not possible....
What I want to do is nothing particular mostly for scientific work. I have an image in a char matrix and I want to display it somewhere on the screen. The first problem was that GRX doesn't do that easily but this I already solved on DOS. My main problem for now is dealing with colors. In DOS usually it was 256 colors and I allocated the colors in col[257] and used it in a GrBuildPixmap(array,xdim,ydim,col) function.
But with Linux the window that X11 open is 16M colors (even if I ask for 256) and it seems the old way doesn't work anymore. How do I do that?
Another problem is with the mouse it seems it doesn't work well even in some of the test programs. Is there a particular way of using it?
Any help?
Thanks, GianPiero Puccioni
Hello, GianPiero,
On Fri, Mar 24, 2000 at 03:17:21PM +0100, GianPiero Puccioni wrote:
Is there an archive of this list so I can check if this topic has been discussed before?
http://www.gnu.de/archive/wilma.cgi/grx
Or someone can point me to a site that discuss this or has examples written for Linux and X11, if it exists?
I don't know, sorry ...
Lots of success,
Anja
On Fri, 24 Mar 2000, GianPiero Puccioni wrote:
Hi, I used GRX with DJGPP on DOS for a while (years ago) and was very happy with it, now I'd like to use it on Linux but I am having a few problems. Compiling and installing was easy and most of the test programs work without problems, but...
Is there an archive of this list so I can check if this topic has been discussed before? Or someone can point me to a site that discuss this or has examples written for Linux and X11, if it exists?
If the above is not possible....
What I want to do is nothing particular mostly for scientific work. I have an image in a char matrix and I want to display it somewhere on the screen. The first problem was that GRX doesn't do that easily but this I already solved on DOS. My main problem for now is dealing with colors. In DOS usually it was 256 colors and I allocated the colors in col[257] and used it in a GrBuildPixmap(array,xdim,ydim,col) function.
But with Linux the window that X11 open is 16M colors (even if I ask for 256) and it seems the old way doesn't work anymore. How do I do that?
Another problem is with the mouse it seems it doesn't work well even in some of the test programs. Is there a particular way of using it?
First make sure your grx wokrs well with your X installition using the test programs.
In case of any problems try the 24/32bpp patch from
http://www.gnu.de/software/GRX/download/grx23.xwin-patch
You should modify your program to work with real RGB color values instead of a color lookuptable:
First call
GrSetRGBcolorMode();
and use
GrColor GrBuildRGBcolorT(int r,int g,int b); GrColor GrBuildRGBcolorR(int r,int g,int b); /* ...R Limits r,g,b to 0..255; ...T doesnŽt */
or
GrColor GrAllocColor(int r,int g,int b);
to calculate the color value from rgb values.
Hope this helps, Hartmut