简体   繁体   English

iOS 2D转换:要使用的库

[英]iOS 2D Transforms: Library to use

I have to perform some 2D transforms under iOS. 我必须在iOS下执行一些2D变换。 I know that you can use the transform property of UIView to apply transforms so I am assuming that somewhere there is some optimized code that one could call on. 我知道你可以使用UIView的transform属性来应用变换,所以我假设某个地方有一些可以调用的优化代码。 However I'm also pretty sure that this stuff is on top of openGL so... 不过我也很确定这个东西是在openGL之上所以...

What could I use to do some simple transforms (fastly) on iOS? 我可以用什么来快速地在iOS上进行一些简单的转换? I just need to translate and rotate points. 我只需要翻译和旋转点。

Using CGAffineTransform one can build combined transformation matrices and then apply them to a CGPoint , CGSize or CGRect . 使用CGAffineTransform可以构建组合转换矩阵,然后将它们应用于CGPointCGSizeCGRect See the documentation here especially Applying Affine Transformations 请参阅此处的文档尤其是应用仿射变换

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM