gdk_pixbuf_render_to_drawable_alpha & segault...
- From: jeff <jeff hype52 com>
- To: gtk-app-devel-list gnome org
- Subject: gdk_pixbuf_render_to_drawable_alpha & segault...
- Date: Sat, 20 Jul 2002 12:37:29 +0000
hi, you'll have to excuse my stupidity on these issues. this is my first attempt at coding anything for
linux/x (and using gtk ;/)
anywho im trying to display transparent png's (actually one on top of another) in a fixed container.
i originally used gdk_pixbuf_render_pixmap_and_mask() but id like to use true alpha and not the alpha
tolerence.. (is this function avail w/out that?)
gdk_pixbuf_render_to_drawable_alpha causes a segfault :{ my code:
(animation bits here just for future implementation, also offset is just a global var i used for offsetting
the images)
void setup_pixmap (char *filename, GtkWidget *fixed)
{
GtkWidget *pix;
GdkPixbufAnimation *anim;
GdkPixbuf *unanim;
if (filename == 0)
return;
anim = gdk_pixbuf_animation_new_from_file(filename, 0);
if (gdk_pixbuf_animation_is_static_image(anim)){
unanim = gdk_pixbuf_animation_get_static_image(anim);
gdk_pixbuf_render_to_drawable_alpha (unanim, pix->window, 0, 0, 0, 0, -1, -1,
GDK_PIXBUF_ALPHA_FULL, 0, GDK_RGB_DITHER_NONE, 0, 0);
gdk_pixbuf_unref(unanim);
}else{
pix = gtk_image_new_from_animation(anim);
gdk_pixbuf_animation_unref(anim);
}
gtk_fixed_put (GTK_FIXED (fixed), pix, offset*30, offset*30);
gtk_widget_show(pix);
offset++;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]