1.UIGraphicsBeginImageContextWithOptions(targetSize,isOpaue,deviceScale); UIGraphicsGetCurrentContext(); CGUIGraphicsGetImageFromCurrentContext(); UIGraphicsEndImageContext();
2.CGColorSpaceCreateDeviceRGB(); CGBitmapContextCreate(); UIGraphicsPushContext(); drawing; UIGraphicsPopContext(); CGBitmapContextCreateImage(context); CGColorSpaceRelease; CGContextRelease;
3.CGContextSaveGState(context); CGContextRestoreGState(context);
4.UIKit functions created context has origin from top left , core graphics functions create origin at bottom left
5.CGContextContactCTM(context,transform)
6.addPath clip
7.setLineDash:count:phase: CGContextSetLineDash(..)