草庐IT

CGContextRotateCTM

全部标签

iphone - 旋转图像上下文 (CGContextRotateCTM) 使其变为空白。为什么?

#defineradians(degrees)(degrees*M_PI/180)UIImage*rotate(UIImage*image){CGSizesize=image.size;;UIGraphicsBeginImageContext(size);CGContextRefcontext=UIGraphicsGetCurrentContext();//Ifthisiscommentedout,imageisreturnedasitis.CGContextRotateCTM(context,radians(90));[imagedrawInRect:CGRectMake(0,0,s

iphone - 旋转图像上下文 (CGContextRotateCTM) 使其变为空白。为什么?

#defineradians(degrees)(degrees*M_PI/180)UIImage*rotate(UIImage*image){CGSizesize=image.size;;UIGraphicsBeginImageContext(size);CGContextRefcontext=UIGraphicsGetCurrentContext();//Ifthisiscommentedout,imageisreturnedasitis.CGContextRotateCTM(context,radians(90));[imagedrawInRect:CGRectMake(0,0,s