Points Versus Pixels in Cocos2D

Points VS. Pixels

We should konw that Cocos2D uses a point system to help position objects on the normal iPhone display (480 × 320 pixels) and the retina display (960 × 640 pix- els).

In the nonretina display a point equals a pixel, but in the retina display a point equals two pixels.

When you set a sprite at position to 24 points, on an iPhone 3G or 3GS it equates to exactly 24 pixels from the left side.

On an iPhone 4 with the retina display it is 48 pixels from the left side.

In both cases, to the player Ole will look like he is in the exact same position onscreen.

posted on 2013-01-03 00:10  紫澜  阅读(199)  评论(0编辑  收藏  举报