免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2796 | 回复: 4
打印 上一主题 下一主题

linux 下的GTK+图形编程问题! [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2004-04-19 16:25 |只看该作者 |倒序浏览
GTK+图形编程中怎么刷新图形?有没有专门的刷新函数?

论坛徽章:
0
2 [报告]
发表于 2004-04-19 17:17 |只看该作者

linux 下的GTK+图形编程问题!

我也正在郁闷中

论坛徽章:
0
3 [报告]
发表于 2004-04-19 17:40 |只看该作者

linux 下的GTK+图形编程问题!

难道是同路人?
有情况站内联系哈
两个人总比一个人强~

论坛徽章:
0
4 [报告]
发表于 2004-04-20 07:02 |只看该作者

linux 下的GTK+图形编程问题!

摘自gtk+-2.0文档

gtk_widget_queue_draw_area ()
void        gtk_widget_queue_draw_area      (GtkWidget *widget,
                                             gint x,
                                             gint y,
                                             gint width,
                                             gint height);


Invalidates the rectangular area of widget defined by x, y, width and height by calling gdk_window_invalidate_rect() on the widget's window and all its child windows. Once the main loop becomes idle (after the current batch of events has been processed, roughly), the window will receive expose events for the union of all regions that have been invalidated.

Normally you would only use this function in widget implementations. You might also use it, or gdk_window_invalidate_rect() directly, to schedule a redraw of a GtkDrawingArea or some portion thereof.

Frequently you can just call gdk_window_invalidate_rect() or gdk_window_invalidate_region() instead of this function. Those functions will invalidate only a single window, instead of the widget and all its children.

The advantage of adding to the invalidated region compared to simply drawing immediately is efficiency; using an invalid region ensures that you only have to redraw one time.

论坛徽章:
0
5 [报告]
发表于 2004-04-20 10:09 |只看该作者

linux 下的GTK+图形编程问题!

會有教程在 http://www.gtk.org.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP