ios point 和 pixel的含义

在stackoverflow上看到的 

@property(nonatomic,readonly)CGSize size DiscussionIn iOS 4.0and later,this value reflects the logical size of the image andis measured in points.In iOS 3.xand earlier,this value always reflects the dimensions of the image measured in pixels.

 

A point is a standard length equivalent to 1x1 pixels on a non-retina device, and 2x2 pixels on a retina device。

 

也就是说,size代表的是point,一个point 是2×2的pixel 矩阵。

所以需要注意的是,在设置相关的size的时候,数值应该取0.5f的整数,在之前画边界线的时候,取0.6f,导致画出的线有粗有细,这是因为0.6point 对应的pixel不为整,导致ios在画的时候有不确定性。

 

posted on 2014-01-15 09:35  小白说我是2B  阅读(532)  评论(0编辑  收藏  举报

导航