Re: [gtk-list] gtk_draw_pixmap problem



On 16 Dec, Dave Swegen scribbled:
->  For some reason which I cannot figure out i get a gdk sigsegv whenever I try
->  to draw one gdkpixmap onto another. The following piece of code always dies at
->  the gdk_draw_pixmap (not the best example in the world, but I cannot see any
->  reason why it shouldn't work: window is simply a gtkwindow). If I comment out
->  the gdk_draw_pixmap it works fine. Any hints would be much appreciated.
->  
->  gtk_widget_push_visual(gdk_imlib_get_visual());
->  gtk_widget_push_colormap(gdk_imlib_get_colormap());
->  im = gdk_imlib_load_image(IMAGE);
->  w=im->rgb_width;h=im->rgb_height;
->  gdk_imlib_render(im, w, h);
->  gdkpm = gdk_imlib_move_image(im);
->  gdkpm2 = gdk_imlib_move_image(im);

see that 2nd move? gdkmp2 is NULL - once a pixmap is MOVED form an
image it doesnt exist in the image anymore
if you wish to have more than one copy use gdk_imlib_copy_image :)

->  gdk_draw_pixmap(gdkpm2,
->  		window->style->black_gc,
->  		gdkpm,
->  		0, 0, 0, 0, w, h);
->  gtkpm = gtk_pixmap_new(gdkpm2, NULL);
->  
->  Cheers
->  	Dave
->  

-- 
--------------- Codito, ergo sum - "I code, therefore I am" --------------------
raster@rasterman.com       /\___ /\ ___/||\___ ____/|/\___  raster@redhat.com
Carsten Haitzler           | _ //__\\ __||_ __\\ ___|| _ /  Red Hat Advanced
218/21 Conner Drive        || // __ \\_ \ | |   \ _/_|| /   Development Labs
Chapel Hill NC 27514 USA   ||\\\/  \//__/ |_|   /___/||\\   919 547 0012 ext 282
+1 (919) 929 9443, 801 4392   For pure Enlightenment   http://www.rasterman.com/

              \|/ ____ \|/  For those of you unaware. This face here is in fact
	      "@'/ ,. \@"   a Linux Kernel Error Message.
	      /_| \__/ |_\
		 \__U_/
							   



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]