开发者

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

开发者 https://www.devze.com 2023-01-20 00:12 出处:网络
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:

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

精彩评论

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