[10660] in The GTK GIMP ToolKit mailing list archive
[gtk-list] RGB image drawing
daemon@ATHENA.MIT.EDU (Dave Swegen)
Thu Dec 3 18:08:16 1998
Date: Thu, 3 Dec 1998 19:28:16 +0000
From: Dave Swegen <dave@recursive.prestel.co.uk>
To: gtk-list@redhat.com
Resent-From: gtk-list@redhat.com
Reply-To: gtk-list@redhat.com
I'm currently trying to draw an RGB image onto the screen. My latest
approach is to load the image, create a pixmap, draw the image onto the
pixmap and then draw the pixmap onto a drawing_area. The problem is that
the program sigsevs at the gdk_draw_rgb_image call. This is the relevant
code:
gint configure_event(GtkWidget *widget, GdkEventConfigure *event)
{
if(gdkpixmap)
gdk_pixmap_unref(gdkpixmap);
gdk_pixmap_new(widget->window,
widget->allocation.width,
widget->allocation.height,
-1);
gdk_draw_rgb_image(gdkpixmap,
widget->style->fg_gc[0], <- Not clear about this
0,0,
piccy->width, piccy->height,
GDK_RGB_DITHER_NONE,
piccy->Image,
piccy->width);
g_print("here\n");
return TRUE;
}
Also, just after gtk_init() I call gdk_rgb_init(). Any help much
appreciated.
Cheers
Dave
--
Dave Swegen <dave@recursive.prestel.co.uk>
.plan: To find a job working with Linux
--
To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null