本文整理汇总了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 ();
}
示例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 ();
}