Fork me on GitHub

difference between CGContextDrawImage et UIImage drawInRect

Internally, -drawInRect: will rotate the image into the correct orientation according to the imageOrientation property, then flip the image upside down to convert UIKit coordinates into CoreGraphics coordinates. Then it will call CGContextDrawImage. In this sense, -drawInRect: is surely slower.

 

But using CGContextDrawImage to target UIKit requires one to do the transformation hassles which may not worth for maintenance.

posted on 2012-04-24 09:34  pengyingh  阅读(478)  评论(0)    收藏  举报

导航