Fix the issues during refactory, the UIGraphicsRenderer using the point size, not pixel size
This commit is contained in:
parent
c49bc5c925
commit
48a7b7f943
|
@ -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);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue