예제 #1
0
파일: GtkEngine.cs 프로젝트: lanicon/xwt-1
        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();
        }
예제 #2
0
파일: GtkEngine.cs 프로젝트: b-theile/xwt
        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();
            }
        }