iphone CoreGraphic 和 UIKit 坐标系统
2013-01-08 15:44 三戒1993 阅读(128) 评论(0) 编辑 收藏 举报In iOS, all drawing occurs in a graphics context. Conceptually, a graphics context is an object that describeswhere and how drawing should occur, including basic drawing attributes such as the colors to use whendrawing, the clipping area, line width and style information, font information, compositing options, and so on.
In addition, as shown in Figure 1-1 (page 14), each graphics context has a coordinate system. More precisely,each graphics context has three coordinate systems:
The drawing (user) coordinate system. This coordinate system is used when you issue drawing commands.
The view coordinate system (base space). This coordinate system is a fixed coordinate system relative tothe view.
The (physical) device coordinate system. This coordinate system represents pixels on the physical screen.Figure 1-1 The relationship between drawing coordinates, view coordinates, and hardware coordinates
![](http://img-my.csdn.net/uploads/201301/08/1357631330_1785.png)
![](http://img-my.csdn.net/uploads/201301/08/1357631355_1208.png)
![](http://img-my.csdn.net/uploads/201301/08/1357631375_7901.png)