mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
[ASDisplayNode] Use kCGBlendModeCopy in a Couple More Places (#2250)
* Use blend mode copy in a couple more places * Add some tests
This commit is contained in:
@@ -677,7 +677,7 @@ extern asimagenode_modification_block_t ASImageNodeRoundBorderModificationBlock(
|
||||
[roundOutline addClip];
|
||||
|
||||
// Draw the original image
|
||||
[originalImage drawAtPoint:CGPointZero];
|
||||
[originalImage drawAtPoint:CGPointZero blendMode:kCGBlendModeCopy alpha:1];
|
||||
|
||||
// Draw a border on top.
|
||||
if (borderWidth > 0.0) {
|
||||
@@ -700,7 +700,7 @@ extern asimagenode_modification_block_t ASImageNodeTintColorModificationBlock(UI
|
||||
// Set color and render template
|
||||
[color setFill];
|
||||
UIImage *templateImage = [originalImage imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
|
||||
[templateImage drawAtPoint:CGPointZero];
|
||||
[templateImage drawAtPoint:CGPointZero blendMode:kCGBlendModeCopy alpha:1];
|
||||
|
||||
UIImage *modifiedImage = UIGraphicsGetImageFromCurrentImageContext();
|
||||
UIGraphicsEndImageContext();
|
||||
|
||||
Reference in New Issue
Block a user