Fix the issues during refactory, the UIGraphicsRenderer using the point size, not pixel size

This commit is contained in:
DreamPiggy 2019-12-15 19:49:41 +08:00
parent c49bc5c925
commit 48a7b7f943
1 changed files with 2 additions and 2 deletions

View File

@ -257,8 +257,8 @@ static inline UIColor * SDGetColorFromPixel(Pixel_8888 pixel, CGBitmapInfo bitma
- (nullable UIImage *)sd_rotatedImageWithAngle:(CGFloat)angle fitSize:(BOOL)fitSize { - (nullable UIImage *)sd_rotatedImageWithAngle:(CGFloat)angle fitSize:(BOOL)fitSize {
if (!self.CGImage) return nil; if (!self.CGImage) return nil;
size_t width = (size_t)CGImageGetWidth(self.CGImage); size_t width = self.size.width;
size_t height = (size_t)CGImageGetHeight(self.CGImage); size_t height = self.size.height;
CGRect newRect = CGRectApplyAffineTransform(CGRectMake(0, 0, width, height), CGRect newRect = CGRectApplyAffineTransform(CGRectMake(0, 0, width, height),
fitSize ? CGAffineTransformMakeRotation(angle) : CGAffineTransformIdentity); fitSize ? CGAffineTransformMakeRotation(angle) : CGAffineTransformIdentity);