> > > I found a bug in libggi: tile-over-xlib produces colors with blue
> > > characteristics.
> > This bug is really really mysterious!
> > I can't reproduce this bug on my private machine!
> 
> > At my FH:
> > WinNT with local Exceed (= X-server for Win32),
> > remotely connected to a Linux Box via telnet,
> > output is redirected to the WinNT Box.
> > (Here I _can_ reproduce this bug very easy)
> 
> That sounds like a problem with setting up the color model of the server
> or similar. Like trying to write "-RGB" instead of the expected "RGB-"
> or BGR<->RGB. Could you try to display a set of base colors and see how 
> they look like ? That might give a clue on the type of error.

Here is the test program:
-----------------------------------
#include <ggi/ggi.h>

int main(void)
{
        ggi_visual_t vis;
        ggi_mode mode;
        ggi_color color;
        ggi_pixel pixel;
        int i;

        ggiInit();

        vis = ggiOpen(NULL);
        if (!vis) ggiPanic("Couldn't open a default visual!\n");

        memset(&mode, GGI_AUTO, sizeof(ggi_mode));
        ggiCheckMode(vis, &mode);
        ggiPrintMode(&mode);

        ggiSetMode(vis, &mode);
        ggiSetColorfulPalette(vis);

        i = 0;

        /* draw basic colors */
        while (!ggiKbhit(vis)) {
                char str[20];

                color.r = 0xFFFF;
                color.g = 0xFFFF;
                color.b = 0xFFFF;
                pixel = ggiMapColor(vis, &color);
                ggiSetGCForeground(vis, pixel);

                sprintf(str, "i: %X", i);
                ggiPuts(vis, 100,0, str);

                color.r = i;
                color.g = 0x0000;
                color.b = 0x0000;

                pixel = ggiMapColor(vis, &color);
                ggiSetGCForeground(vis, pixel);
                ggiDrawBox(vis, 0,0, 20,20);

                color.r = 0x0000;
                color.g = i;
                color.b = 0x0000;

                pixel = ggiMapColor(vis, &color);
                ggiSetGCForeground(vis, pixel);
                ggiDrawBox(vis, 0,30, 20,20);

                color.r = 0x0000;
                color.g = 0x0000;
                color.b = i;

                pixel = ggiMapColor(vis, &color);
                ggiSetGCForeground(vis, pixel);
                ggiDrawBox(vis, 0,60, 20,20);

                i += 0x0100;
                if (i >= 65536) i = 0;

                ggiFlush(vis);
        }       /* while */

        ggiClose(vis);
        ggiExit();
}       /* main */
------------------------------------ 

This program shows/should show a red, green and a blue box and a white
counter.

And here is the result (below the line is the color I see on the screen):

used display                                           red       green    
blue       counter
------------------------------------------------
GGI_DISPLAY="X"                                 red       green     blue    
  white
GGI_DISPLAY="Xlib"                              red      green      blue    
 white
GGI_DISPLAY="tile:0,0,640,480,(X)"      red       green      blue      white
GGI_DISPLAY="tile:0,0,640,480,(Xlib)"   black    blue         green   light
blue

-- 
CU,

Christoph Egger
E-Mail: [EMAIL PROTECTED]

GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net

Attachment: "
Description: Binary data

Reply via email to