开发者

How can I change the underlying points coordinate space of the iPad in such a way, that 1 point equals 2 pixels?

How can I change the underlying points c开发者_C百科oordinate space of the iPad in such a way, that 1 point equals 2 pixels?


Apply a CGAffineTransformScale to whatever view you are using:

myView.transform = CGAffineTransformScale(myView.transform, 2.0, 2.0);

Here is a great blog post on the use of transforms:

http://iphonedevelopment.blogspot.com/2008/10/demystifying-cgaffinetransform.html


hum!

static __inline__ CGPoint CGPointMake2(CGFloat x, CGFloat y)
{
  CGPoint p; 
  p.x = x*2; // twice the pixels.
  p.y = y*2; 
  return p;
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜