public override object RenderWidget(Widget widget) { var w = ((WidgetBackend)widget.GetBackend()).Widget; Gdk.Window win = w.GdkWindow; if (win != null && win.IsViewable) { int ww, wh; win.GetSize(out ww, out wh); if (ww == w.Allocation.Width && wh == w.Allocation.Height) { return(new GtkImage(win.ToPixbuf(0, 0, w.Allocation.Width, w.Allocation.Height))); } return(new GtkImage(win.ToPixbuf(w.Allocation.X, w.Allocation.Y, w.Allocation.Width, w.Allocation.Height))); } throw new InvalidOperationException(); }
public override object RenderWidget(Widget widget) { var w = ((WidgetBackend)widget.GetBackend()).Widget; Gdk.Window win = w.GdkWindow; if (win != null && win.IsViewable) { return(new GtkImage(win.ToPixbuf(w.Allocation.X, w.Allocation.Y, w.Allocation.Width, w.Allocation.Height))); } else { throw new InvalidOperationException(); } }