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


C# Widget.GetBackend方法代码示例

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


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

示例1: RenderWidget

 public override object RenderWidget(Widget w)
 {
     var view = ((ViewBackend)w.GetBackend ()).Widget;
     view.LockFocus ();
     return new NSImage (view.DataWithPdfInsideRect (view.Bounds));
 }
开发者ID:nite2006,项目名称:xwt,代码行数:6,代码来源:MacEngine.cs

示例2: RenderWidget

		public override object RenderWidget (Widget w)
		{
			var view = ((ViewBackend)w.GetBackend ()).Widget;
			view.LockFocus ();
			var img = new NSImage (view.DataWithPdfInsideRect (view.Bounds));
			var imageData = img.AsTiff ();
			var imageRep = (NSBitmapImageRep)NSBitmapImageRep.ImageRepFromData (imageData);
			var im = new NSImage ();
			im.AddRepresentation (imageRep);
			im.Size = new System.Drawing.SizeF ((float)view.Bounds.Width, (float)view.Bounds.Height);
			return im;
		}
开发者ID:StEvUgnIn,项目名称:xwt,代码行数:12,代码来源:MacEngine.cs

示例3: RenderWidget

 public override object RenderWidget(Widget widget)
 {
     try {
         var w = ((WidgetBackend)widget.GetBackend ()).Widget;
         RenderTargetBitmap rtb = new RenderTargetBitmap ((int)w.ActualWidth, (int)w.ActualHeight, 96, 96, PixelFormats.Pbgra32);
         rtb.Render(w);
         return new WpfImage(rtb);
     } catch (Exception ex) {
         throw new InvalidOperationException ("Rendering element not supported", ex);
     }
 }
开发者ID:akrisiun,项目名称:xwt,代码行数:11,代码来源:WPFEngine.cs

示例4: RenderWidget

		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 ();
		}
开发者ID:StEvUgnIn,项目名称:xwt,代码行数:9,代码来源:GtkEngine.cs

示例5: RenderWidget

		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 ();
		}
开发者ID:m13253,项目名称:xwt,代码行数:13,代码来源:GtkEngine.cs


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