当前位置: 首页>>代码示例>>C#>>正文


C# Gtk.Window.Realize方法代码示例

本文整理汇总了C#中Gtk.Window.Realize方法的典型用法代码示例。如果您正苦于以下问题:C# Gtk.Window.Realize方法的具体用法?C# Gtk.Window.Realize怎么用?C# Gtk.Window.Realize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Gtk.Window的用法示例。


在下文中一共展示了Gtk.Window.Realize方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CairoPositionSnapshot

            public CairoPositionSnapshot(ArrayList pos,
						      int width, int height)
            {
                fm = new FigureManager ();
                Gtk.Window win =
                    new Gtk.Window (Gtk.WindowType.
                            Toplevel);
                win.Realize ();
                map = new Gdk.Pixmap (win.GdkWindow, width,
                              height);
                cairo = Gdk.CairoHelper.Create (map);

                FontDescription fontdesc =
                    GetFontDesc (width, height);
                  GetCoordLayoutDetails (win.PangoContext,
                             fontdesc);

                  border_color = new Cairo.Color (0, 0, 0);
                //                              blacksq_color = new Gdk.Color (200, 200, 200);
                //                              whitesq_color = new Gdk.Color (240, 240, 240);
                  blacksq_color =
                    new Cairo.Color (250 / 256.0,
                             120 / 256.0,
                             32 / 256.0);
                  whitesq_color =
                    new Cairo.Color (255 / 256.0,
                             250 / 256.0,
                             170 / 256.0);
                  background_color =
                    new Cairo.Color (1, 1, 1);
                  foreground_color =
                    new Cairo.Color (0, 0, 0);
                //                                arrow_color = new Gdk.Color (159, 148, 249);
                  arrow_color =
                    new Cairo.Color (117 / 256.0,
                             6 / 256.0,
                             6 / 256.0);

                //                      blacksq_color = new Gdk.Color(210, 60, 0);
                //                      whitesq_color = new Gdk.Color(236, 193, 130);
                // outer box, coord, inner box
                  ComputeSizes (width, height);

                  position = new Position (pos);

                  fm.SetSize (size);

                  DrawBackground ();
                  DrawPosition ();
            }
开发者ID:BackupTheBerlios,项目名称:csboard-svn,代码行数:50,代码来源:CairoPositionSnapshot.cs

示例2: PositionSnapshot

            public PositionSnapshot(ArrayList pos, int width,
						 int height)
            {
                Gtk.Window win =
                    new Gtk.Window (Gtk.WindowType.
                            Toplevel);
                win.Realize ();
                map = new Gdk.Pixmap (win.GdkWindow, width,
                              height);
                gc = new Gdk.GC (map);

                FontDescription fontdesc =
                    GetFontDesc (width, height);
                  GetCoordLayoutDetails (win.PangoContext,
                             fontdesc);

                  border_color = new Gdk.Color (0, 0, 0);
                //                              blacksq_color = new Gdk.Color (200, 200, 200);
                //                              whitesq_color = new Gdk.Color (240, 240, 240);
                  blacksq_color =
                    new Gdk.Color (250, 120, 32);
                  whitesq_color =
                    new Gdk.Color (255, 250, 170);
                  background_color =
                    new Gdk.Color (255, 255, 255);
                  foreground_color = new Gdk.Color (0, 0, 0);
                //                                arrow_color = new Gdk.Color (159, 148, 249);
                  arrow_color = new Gdk.Color (117, 6, 6);

                //                      blacksq_color = new Gdk.Color(210, 60, 0);
                //                      whitesq_color = new Gdk.Color(236, 193, 130);
                // outer box, coord, inner box
                  ComputeSizes (width, height);

                if (figure == null)
                    figure = new Figure ();
                  position = new Position (pos);

                  figure.SetSize (size);

                  DrawBackground ();
                  DrawPosition ();
            }
开发者ID:BackupTheBerlios,项目名称:csboard-svn,代码行数:43,代码来源:PositionSnapshot.cs


注:本文中的Gtk.Window.Realize方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。