colormap changes
- From: Sean Kessler <smkessler us fortis com>
- To: gtk-list redhat com
- Subject: colormap changes
- Date: Tue, 01 Dec 1998 10:32:11 -0600
I am loading a bitmap file (microsoft .BMP) that contains
a 256 color palette and pixel data that represents indices
into this palette (BI_RGB). I created a GdkPixmap in which
to display my bitmap. I have been able to display the bitmap.
However, not all of my colors are being displayed properly.
I am first using ::gdk_window_get_colormap(..) to get the
colormap. Next, I set the entries in colormap->color to the
entries in my loaded palette and call ::gdk_colormap_change(..).
Next, I call ::gdk_gc_new(..) to create a copy of the GC of
the display window (not sure if I have to do this but I do it).
Finally, for every pixel in the bitmap I call ::gdk_gc_set_foreground(..)
.... there MUST be a better way than calling this as it is pretty slow....
and proceed to draw the point into the pixmap. The pixmap gets
displayed when configure_event fires. Like I explained earlier,
the bitmap (aside from being upside down, i'll take care of that
later) does not appear to be mapped correctly into the GC and
I'm not 100% sure how to accomplish this. Any help would be
greaty appreciated. My apologies, I'm new to this stuff.
Sean
euroap@li.net
smkessler@us.fortis.com
****************************************************************
Please Note
The information in this E-mail message is legally privileged
and confidential information intended only for the use of the
individual(s) named above. If you, the reader of this message,
are not the intended recipient, you are hereby notified that
you should not further disseminate, distribute, or forward this
E-mail message. If you have received this E-mail in error,
please notify the sender. Thank you
*****************************************************************
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]