summaryrefslogtreecommitdiff
path: root/vcl/quartz/salbmp.cxx
diff options
context:
space:
mode:
authortsahi glik <tsahi.glik@cloudon.com>2014-01-17 17:12:13 -0800
committertsahi glik <tsahi.glik@cloudon.com>2014-01-17 17:12:13 -0800
commitaf5b416cc9371440872d24cb17ee842359b3ac4f (patch)
treea27003b868ba1873971a0309e1c4864e73ce9304 /vcl/quartz/salbmp.cxx
parent602c87b4259d118e5db6d8a990c4695103f916dd (diff)
fix dropshadow on ios
Diffstat (limited to 'vcl/quartz/salbmp.cxx')
-rw-r--r--vcl/quartz/salbmp.cxx16
1 files changed, 15 insertions, 1 deletions
diff --git a/vcl/quartz/salbmp.cxx b/vcl/quartz/salbmp.cxx
index 66576d31c5cc..0d665ffaf7dc 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;
}