fix dropshadow on ios

This commit is contained in:
tsahi glik
2014-01-17 17:12:13 -08:00
parent 602c87b425
commit af5b416cc9

View File

@@ -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;
}