在哪里可以找到 iPhone 上的 Quartz 2D 绘图示例?
我将使用 Quartz 在 Iphone 中开发 2D 游戏。
Quartz 和 QuartzCore 之间的主要区别是什么?
我在互联网上搜索了很多,但只能找到带有 Quartz Examples 的 MAC OS。
如果任何机构有任何使用 Iphone 开发的 Quartz(2D) 示例的链接/URL,它将在真实的 Iphone 设备中运行? 另外,如果可能的话,请提供 Quartz Iphone 的一堆示例/存储库的链接。
谢谢,
米沙尔·沙阿
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我想你可能会在这里混淆一些事情。 Quartz 允许您进行静态 2-D 矢量绘图,但这与 QuartzCore 框架不同,如果您希望使用 Core Animation,则可以将 QuartzCore 框架导入到项目中。当谈到 Mac 或 iPhone 上的 2D 动画时,Core Animation 正是您所需要的(如果您不打算走 OpenGL ES 的路)。你确实不想使用 Quartz 来重绘移动场景,因为你会得到糟糕的显示性能。
这确实令人困惑,因为您可以使用 Quartz 将 2-D 矢量或光栅艺术绘制到 UIViews 或 CALayers 中,然后使用 Core Animation 对其进行动画处理。为了更好地介绍 Quartz,我推荐 Quartz 2D 编程指南。对于核心动画,有 核心动画编程指南,以及 比尔·杜德尼 (Bill Dudney) 的核心动画书。
你是对的,Mac 上的 Quartz 以及 Core Animation 都有很多示例代码,但好处是 Quartz 和 Core Animation 在 Mac 和 iPhone 上使用几乎相同的 API。虽然存在一些细微的差异,但大多数情况下,为一种语言编写的代码可以在另一种语言上运行。例如,我们设计了核心图框架
围绕核心动画,使用 Quartz 绘图,因为我们可以在 Mac 和 iPhone 版本的框架之间拥有几乎相同的代码库。这至少是您可以查看的一大段示例代码。
最后,Opacity 是一个非常简洁的实用程序,可让您绘制矢量图稿并生成 Quartz 绘图代码来重现该图稿在您的应用程序中。这是尝试新事物的好方法。
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.
该项目中有许多非常好的 Quartz2D 和 CoreAnimation 动画示例,来自关于 Core Animation 的 360iDev 会议:
http: //github.com/neror/CA360
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
您应该阅读 Quartz 2D 编程指南。阅读完指南后,请查看 QuartzDemo。
You should read the Quartz 2D Programming Guide. After reading the guide, take a look at QuartzDemo.