简体   繁体   English

在iPhone上仅显示图像的指定区域

[英]show only specified area of image on iphone

通过依次显示所有框,可以为“舞女”制作动画。

I want to create an animation from a single image. 我想从单个图像创建动画。 Typically by displaying cropped part of image on the output canvas/box. 通常,通过在输出画布/框上显示图像的裁剪部分。 Should I use CIcrop or anyother techniques and idea to do it. 我是否应该使用CIcrop或其他任何技术和想法来做到这一点。

Thanks. 谢谢。

If you don't want to use cocos2D framework you can use something like "flip book animations". 如果您不想使用cocos2D框架,则可以使用“翻书动画”之类的方法。

This method is quite well described in the book PJ Cabrera - Beginning iPhone Games Development 2010 in chapter 4 : "She Shoots, She Hits, She Scores!" 在《 PJ Cabrera-Beginning iPhone Games Development 2010第4章 :“她射击,击中,得分”中对此方法进行了很好的描述。

You can also find source code of ch.4 in Source Code/Downloads tab 您还可以在“源代码/下载”选项卡中找到第4章的源代码。

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

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