Re: [gtk-list] Re: problem with bitmaps
- From: Robert Wilhelm <robert physiol med tu-muenchen de>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Re: problem with bitmaps
- Date: Thu, 13 Nov 1997 10:45:34 +0100
On Wed, Nov 12, 1997 at 06:39:46PM -0600, Rob Browning wrote:
> I haven't looked at your code carefully, but it's possible that you're
> getting bitten by a bug I patched recently in gtk_image wrt redraws.
> Check the mailing list archives for my message with a subject starting
> "Patch for gtkimage.c" and see if that helps. You can also find the
> patch in the gtk patches directory (wherever that is) at ftp.gimp.org.
>
I have tried your patch, but it does not make any difference.
I get still a solid black box.
Here is a shorter version of my test program:
#include <gtk/gtk.h>
#define bm_width 16
#define bm_height 16
static unsigned char bm_bits[] = {
136,136, /* 1000100010001000 */
17, 17, /* 0001000100010001 */
34, 34, /* 0010001000100010 */
68, 68, /* 0100010001000100 */
136,136, /* 1000100010001000 */
17, 17, /* 0001000100010001 */
34, 34, /* 0010001000100010 */
68, 68, /* 0100010001000100 */
136,136, /* 1000100010001000 */
17, 17, /* 0001000100010001 */
34, 34, /* 0010001000100010 */
68, 68, /* 0100010001000100 */
136,136, /* 1000100010001000 */
17, 17, /* 0001000100010001 */
34, 34, /* 0010001000100010 */
68, 68 /* 0100010001000100 */
};
int main (int argc, char *argv[])
{
GtkWidget *window, *gtk_img;
GdkImage *image;
gtk_init (&argc, &argv);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
image = gdk_image_new_bitmap(gdk_visual_get_system(),
bm_bits,bm_width,bm_height);
gtk_img = gtk_image_new(image, NULL);
gtk_container_add(GTK_CONTAINER(window), gtk_img);
gtk_widget_show(gtk_img);
gtk_widget_show (window);
gtk_main ();
return 0;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]