Colormap issues
Hi everyone, I'm a little confused as to how the following code can produce the output: succeeded... 15736992 256 gdk_color_parse("green", &color); if(gdk_colormap_alloc_color(colormap, &color, FALSE, TRUE)) printf("succeeded... %d %d\n", color.pixel, colormap->size); The pixel value is obviously causing a few problems later on when I try to query the color. I had been under the impression that the printf statement wouldn't be executed unless the pixel value had been filled in. Is this not the case? Thanks for any info! Brooke ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: Colormap issues
Hi, "Dennie, Brooke" <[EMAIL PROTECTED]> writes: > I'm a little confused as to how the following code can produce the > output: > > succeeded... 15736992 256 > > gdk_color_parse("green", &color); > if(gdk_colormap_alloc_color(colormap, &color, FALSE, TRUE)) > printf("succeeded... %d %d\n", color.pixel, colormap->size); Unless you are really running this on an 8bit pseudo-color display, this output doesn't look particulary suspicious to me. The expected result depends on the visual of the colormap but you aren't supposed to care about this at all. Sven ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list