Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix low-quality masks on iOS (#1658)
This PR fixes low-quality masks on iOS. This was caused by the bitmap for the mask being created with [CGBitmapContextCreate()](https://developer.apple.com/documentation/coregraphics/1455939-cgbitmapcontextcreate) which does not take into account the device's pixel-density, unlike [UIGraphicsBeginImageContextWithOptions()](https://developer.apple.com/documentation/uikit/1623912-uigraphicsbeginimagecontextwitho). To fix it, the pixel-density is retrieved using `[[UIScreen mainScreen] scale]` and it is used as a scale factor for the mask bitmap.
- Loading branch information