标签:
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);
标签:
原文地址:http://www.cnblogs.com/reanote/p/gtk_shape_window.html