本文整理汇总了C#中Gdk.GC.GetValues方法的典型用法代码示例。如果您正苦于以下问题:C# GC.GetValues方法的具体用法?C# GC.GetValues怎么用?C# GC.GetValues使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gdk.GC
的用法示例。
在下文中一共展示了GC.GetValues方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreatePixmaps
private void CreatePixmaps()
{
GCValues shapeGCV;
//Create a 1 depth pixmap used as a shape
//that will contain the info about transparency
shape = new Pixmap (null, Gdk.Screen.Default.Width, Gdk.Screen.Default.Height, 1);
shapeGC = new Gdk.GC (shape);
shapeGCV = new GCValues ();
shapeGC.GetValues (shapeGCV);
transparent = shapeGCV.Foreground;
opaque = shapeGCV.Background;
shapeGC.Foreground = transparent;
shape.DrawRectangle (shapeGC, true, 0, 0, Gdk.Screen.Default.Width, Gdk.Screen.Default.Height);
shapeGC.Background = opaque;
ShapeCombineMask (shape, 0, 0);
//Create the pixmap that will contain the real drawing
//Used on Expose event to redraw the drawing area
pixmap = new Pixmap (drawingarea.GdkWindow, Gdk.Screen.Default.Width, Gdk.Screen.Default.Height);
pixmap.DrawRectangle (drawingarea.Style.BlackGC, true, 0, 0, Gdk.Screen.Default.Width, Gdk.Screen.Default.Height);
}