diff options
author | Lluis Sanchez <lluis@xamarin.com> | 2013-12-02 13:16:17 +0400 |
---|---|---|
committer | Lluis Sanchez <lluis@xamarin.com> | 2013-12-02 13:16:17 +0400 |
commit | 31083e058e7bf79504d01de9d5486d7ca478a1f6 (patch) | |
tree | 9b5a40d4e3edac9b39e1d0dfc0c7dfb99c69b2f9 /Xwt.Gtk/Xwt.GtkBackend | |
parent | 2b7a78e58e6571505eae8b8797fe1a76d30cd5de (diff) |
Fixed rendering of 9-patch images in retina resolution
Diffstat (limited to 'Xwt.Gtk/Xwt.GtkBackend')
-rw-r--r-- | Xwt.Gtk/Xwt.GtkBackend/ImageHandler.cs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Xwt.Gtk/Xwt.GtkBackend/ImageHandler.cs b/Xwt.Gtk/Xwt.GtkBackend/ImageHandler.cs index 1847da6f..26c4e869 100644 --- a/Xwt.Gtk/Xwt.GtkBackend/ImageHandler.cs +++ b/Xwt.Gtk/Xwt.GtkBackend/ImageHandler.cs @@ -344,8 +344,9 @@ namespace Xwt.GtkBackend using (var ctx = new Cairo.Context (sf)) { ImageDescription idesc = new ImageDescription () { Alpha = 1, - Size = new Size (width * scaleFactor, height * scaleFactor) + Size = new Size (width, height) }; + ctx.Scale (scaleFactor, scaleFactor); Draw (actx, ctx, scaleFactor, 0, 0, idesc); var f = new ImageFrame (ImageBuilderBackend.CreatePixbuf (sf), Math.Max((int)width,1), Math.Max((int)height,1), true); AddFrame (f); |