Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/xwt.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLluis Sanchez <lluis@xamarin.com>2013-07-03 22:24:35 +0400
committerLluis Sanchez <lluis@xamarin.com>2013-07-03 22:24:35 +0400
commit3931e365fe48085ce0decc6cabd96a8e06c3c171 (patch)
tree950d5495070f43157f42ba5f617319479986708c /Xwt.Gtk/Xwt.GtkBackend/GtkEngine.cs
parente355958bc165dcc4d8a2ff770be180ad78f65648 (diff)
Add support for rendering images into a native surface object
Diffstat (limited to 'Xwt.Gtk/Xwt.GtkBackend/GtkEngine.cs')
-rwxr-xr-xXwt.Gtk/Xwt.GtkBackend/GtkEngine.cs9
1 files changed, 9 insertions, 0 deletions
diff --git a/Xwt.Gtk/Xwt.GtkBackend/GtkEngine.cs b/Xwt.Gtk/Xwt.GtkBackend/GtkEngine.cs
index 5f4fef62..e4aae705 100755
--- a/Xwt.Gtk/Xwt.GtkBackend/GtkEngine.cs
+++ b/Xwt.Gtk/Xwt.GtkBackend/GtkEngine.cs
@@ -259,6 +259,15 @@ namespace Xwt.GtkBackend
else
throw new InvalidOperationException ();
}
+
+ public override void RenderImage (object nativeWidget, object nativeContext, ImageDescription img, double x, double y)
+ {
+ GtkImage gim = (GtkImage)img.Backend;
+ Cairo.Context ctx = nativeContext as Cairo.Context;
+ Gtk.Widget w = (Gtk.Widget)nativeWidget;
+ if (ctx != null)
+ gim.Draw (ApplicationContext, ctx, Util.GetScaleFactor (w), x, y, img);
+ }
}
public interface IGtkContainer