[Libreoffice-commits] core.git: vcl/quartz

tsahi glik tsahi.glik at cloudon.com
Fri Jan 17 17:12:42 PST 2014


 vcl/quartz/salbmp.cxx |   16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

New commits:
commit af5b416cc9371440872d24cb17ee842359b3ac4f
Author: tsahi glik <tsahi.glik at cloudon.com>
Date:   Fri Jan 17 17:12:13 2014 -0800

    fix dropshadow on ios

diff --git a/vcl/quartz/salbmp.cxx b/vcl/quartz/salbmp.cxx
index 66576d3..0d665ff 100644
--- a/vcl/quartz/salbmp.cxx
+++ b/vcl/quartz/salbmp.cxx
@@ -138,12 +138,26 @@ bool QuartzSalBitmap::Create( CGImageRef xImage, int nBitmapBits,
 
     // copy layer content into the bitmap buffer
     if(mxGraphicContext) // remove warning
+    {
+        // Flip the image right side up & draw
+        CGContextSaveGState(mxGraphicContext);
+
+        CGContextScaleCTM(mxGraphicContext, 1.0, -1.0);
+        CGContextTranslateCTM(mxGraphicContext, 0.0, -aLayerSize.height);
+
         CGContextDrawImage( mxGraphicContext,
                            CGRectMake(static_cast<CGFloat>(-nX),
-                                      static_cast<CGFloat>(-nY),
+                                      static_cast<CGFloat>(nY),
                                       aLayerSize.width,
                                       aLayerSize.height),
                            xImage );
+
+        // Restore the context so that the coordinate system is restored
+        CGContextRestoreGState(mxGraphicContext);
+
+    }
+
+
     return true;
 }
 


More information about the Libreoffice-commits mailing list