杨锴
2025-03-11 90dc3329d1973fda691e357cf4523d5c7c67fa1d
Pods/SDWebImage/SDWebImage/Core/UIImage+Transform.h
@@ -98,7 +98,8 @@
#pragma mark - Image Blending
/**
 Return a tinted image with the given color. This actually use alpha blending of current image and the tint color.
 Return a tinted image with the given color. This actually use `sourceIn` blend mode.
 @note Before 5.20, this API actually use `sourceAtop` and cause naming confusing. After 5.20, we match UIKit's behavior using `sourceIn`.
 
 @param tintColor  The tint color.
 @return The new image with the tint color.
@@ -106,6 +107,16 @@
- (nullable UIImage *)sd_tintedImageWithColor:(nonnull UIColor *)tintColor;
/**
 Return a tinted image with the given color and blend mode.
 @note The blend mode treat `self` as background image (destination), treat `tintColor` as input image (source). So mostly you need `source` variant blend mode (use `sourceIn` not `destinationIn`), which is different from UIKit's `+[UIImage imageWithTintColor:]`.
 @param tintColor  The tint color.
 @param blendMode The blend mode.
 @return The new image with the tint color.
 */
- (nullable UIImage *)sd_tintedImageWithColor:(nonnull UIColor *)tintColor blendMode:(CGBlendMode)blendMode;
/**
 Return the pixel color at specify position. The point is from the top-left to the bottom-right and 0-based. The returned the color is always be RGBA format. The image must be CG-based.
 @note The point's x/y will be converted into integer.
 @note The point's x/y should not be smaller than 0, or greater than or equal to width/height.