1.Quartz支持两种坐标系统:
- 用户坐标空间:用于文档页面的坐标系统,使用浮点数标记,与分辨率无关。
- 设备坐标空间:显示设备的坐标系统,使用整数标记,与分辨率相关。
Quartz自动将用户坐标空间匹配到设备坐标空间。
2. CTM进行坐标变换,创建Context时CTM是单位阵。
3. Rotation,Scaling,Translation
4. 创建CGAffineTransform,并应用到CTM上
5. CGAffineTransformEqualToTransform/CGAffineTransformIsIdentity
6. CGContextGetUserSpaceToDeviceSpaceTransform/
CGContextConverPointToDeviceSpace/CGContextConvertPointToUserSpace
CGContextConverSizeToDeviceSpace/CGContextConvertSizeToDeviceSpace
CGContextConvertRectToDeviceSpace/CGContextConverRectToUserSpace