GTK+中文社区(gtk.awaysoft.com)

 找回密码
 马上加入

QQ登录

只需一步,快速开始

查看: 2242|回复: 0

gdk_draw_pixbuf出错了,怎么办?

[复制链接]

该用户从未签到

发表于 2012-4-6 11:51:59 | 显示全部楼层 |阅读模式
  pixbuf=gdk_pixbuf_new_from_file("./meigui.png",NULL);
      bitmap=(GdkBitmap*)gdk_pixmap_new(NULL,width,height,1);
    gc=gdk_gc_new(bitmap);
     gdk_draw_pixbuf(bitmap,gc,pixbuf,0,0,0,0,200,200,GDK_RGB_DITHER_NORMAL,0,0);
gtk_widget_shape_combine_mask(widget,bitmap,0,0);
       gtk_widget_show(widget);

大至程序就上面,编译能过,运行没反应,提示

The gdk_draw_*_image require the drawable argument to have a specified colormap.All windows have a colormap,however, pixmaps only have colormap by default if they were created with a non-NULL window argument. Otherwise a colormap must be set on them with gdk_drawable_set_colormap
*滑块验证:
您需要登录后才可以回帖 登录 | 马上加入

本版积分规则

申请友链|Archiver|小黑屋|手机版|GTK+中文社区 ( 粤ICP备13080851号 )

我要啦免费统计

GMT+8, 2024-12-22 02:24 , Processed in 0.024979 second(s), 8 queries , Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表