码迷,mamicode.com
首页 > Windows程序 > 详细

GTK不规则窗体

时间:2016-01-24 22:11:06      阅读:182      评论:0      收藏:0      [点我收藏+]

标签:

GTK不规则窗体示例
GdkBitmap *window_shape_bitmap = gdk_pixmap_new(NULL, m_ROI.width + 2, m_ROI.height + 2, 1);
GdkGC *gc = gdk_gc_new(window_shape_bitmap);
GdkColormap *colorMap = gdk_colormap_get_system();
GdkColor black, white;
gdk_color_black(colorMap, &black);
gdk_color_white(colorMap, &white);
gdk_gc_set_foreground(gc, &white);
gdk_gc_set_background(gc, &black);
gdk_draw_rectangle(window_shape_bitmap, gc, true, 0, 0, m_ROI.width + 2, m_ROI.height + 2);
gtk_widget_shape_combine_mask((GtkWidget*)m_RootWindow->gobj(), window_shape_bitmap, m_ROI.x - 1, m_ROI.y - 1);

 

GTK不规则窗体

标签:

原文地址:http://www.cnblogs.com/reanote/p/gtk_shape_window.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!