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-11-08 16:39:37 +0400
committerLluis Sanchez <lluis@xamarin.com>2013-11-08 16:40:01 +0400
commit67a97ff70ffd5b488a4073ae7abad2173054c6c5 (patch)
treed866978ade3574ab397c4d5a79503b371a9553ea /Xwt.Mac
parentd410f30c53b46aac9c2dc6b5eca57af1a2c828c9 (diff)
[Mac] Fix vector image rendering issue
Flip the image if the target surface is not flipped.
Diffstat (limited to 'Xwt.Mac')
-rw-r--r--Xwt.Mac/Xwt.Mac/ImageHandler.cs5
1 files changed, 5 insertions, 0 deletions
diff --git a/Xwt.Mac/Xwt.Mac/ImageHandler.cs b/Xwt.Mac/Xwt.Mac/ImageHandler.cs
index 65b2f5fe..ec7acb77 100644
--- a/Xwt.Mac/Xwt.Mac/ImageHandler.cs
+++ b/Xwt.Mac/Xwt.Mac/ImageHandler.cs
@@ -261,6 +261,11 @@ namespace Xwt.Mac
public void DrawIt (NSObject ob)
{
CGContext ctx = NSGraphicsContext.CurrentContext.GraphicsPort;
+ if (!NSGraphicsContext.CurrentContext.IsFlipped) {
+ // Custom drawing is done using flipped order, so if the target surface is not flipped, we need to flip it
+ ctx.TranslateCTM (0, Size.Height);
+ ctx.ScaleCTM (1, -1);
+ }
DrawInContext (ctx);
}