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

时间:2021-07-31 21:18:07

在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.

1 个解决方案

#1


1  

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!"

这个方法在第4章PJ Cabrera - Beginning iPhone Games Development 2010中有很好的描述:“她射击,她命中,她得分!”

You can also find source code of ch.4 in Source Code/Downloads tab

您还可以在源代码/下载选项卡中找到ch.4的源代码

#1


1  

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!"

这个方法在第4章PJ Cabrera - Beginning iPhone Games Development 2010中有很好的描述:“她射击,她命中,她得分!”

You can also find source code of ch.4 in Source Code/Downloads tab

您还可以在源代码/下载选项卡中找到ch.4的源代码