Where can I find examples of Quartz 2D drawing on the iPhone?

本小妞迷上赌 提交于 2019-11-29 10:09:06

问题


I am going to develope the 2D game in Iphone using Quartz.

what is the main Difference between Quartz and QuartzCore?

I have searched a lot over the internet, but only able to find out the MAC OS with Quartz Examples.

If any body has any Link/URL for Examples of Quartz(2D) using Iphone Developement,which would be run in the Real Iphone Device? Also if possible than give the Link for Bunch of examples/repository for Quartz Iphone.

Thanks,

Mishal Shah


回答1:


There are a number of very nice Quartz2D and CoreAnimation animation examples in this project, from the 360iDev conference session on Core Animation:

http://github.com/neror/CA360




回答2:


I think you might be confusing a few things here. Quartz lets you do static 2-D vector drawing, but this is different from the QuartzCore framework, which you import into a project if you wish to use Core Animation. Core Animation is what you're looking for when it comes to 2-D animation on the Mac or iPhone (if you aren't going to go the way of OpenGL ES). You really do not want to use Quartz to redraw a moving scene, because you will get terrible display performance.

This does get confusing, because you can use Quartz to draw 2-D vector or raster art into UIViews or CALayers, and then animate those around using Core Animation. For a good introduction to Quartz, I recommend the Quartz 2D Programming Guide. For Core Animation, there is the Core Animation Programming Guide, as well as the Core Animation book by Bill Dudney.

You're right, there is a lot of sample code out there for Quartz on the Mac, as well as for Core Animation, but the nice thing is that Quartz and Core Animation use almost identical APIs on the Mac and iPhone. There are a few small differences, but for the most part code written for one runs on the other. As an example, we designed the Core Plot framework around Core Animation, using Quartz drawing, because we can have an almost identical codebase between our Mac and iPhone versions of the framework. That's at least one large piece of sample code that you can look at.

Finally, Opacity is a really neat utility that lets you draw vector artwork and generate the Quartz drawing code to reproduce that artwork within your application. It's a great way to try things out.




回答3:


You should read the Quartz 2D Programming Guide. After reading the guide, take a look at QuartzDemo.



来源:https://stackoverflow.com/questions/1677984/where-can-i-find-examples-of-quartz-2d-drawing-on-the-iphone

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!