iphone CoreGraphic 和 UIKit 坐标系统

来源:互联网 发布:阿里云 电商解决方案 编辑:程序博客网 时间:2024/05/16 07:07

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 inFigure 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

page14image9680


原创粉丝点击