1
1
mirror of https://github.com/exyte/Macaw.git synced 2024-09-11 13:15:35 +03:00

ImageRenderer opacity fix. Fixes #49

This commit is contained in:
Victor Sukochev 2016-09-08 11:40:27 +06:00
parent 04e5d57991
commit 498f5e948f

View File

@ -49,7 +49,12 @@ class ImageRenderer: NodeRenderer {
rect = CGRectMake(0, 0, w, h)
}
}
uiimage.drawInRect(rect)
CGContextScaleCTM(ctx.cgContext, 1.0, -1.0)
CGContextTranslateCTM(ctx.cgContext, 0.0, -1.0 * rect.height)
CGContextSetAlpha(ctx.cgContext, CGFloat(opacity))
CGContextDrawImage(ctx.cgContext, rect, uiimage.CGImage)
}
}