在iPhone游戏中使用矢量图形

在iPhone游戏中使用矢量图形

本文介绍了在iPhone游戏中使用矢量图形的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Flash / AS3的开发者,我想知道一些iPhone开发者如何在他们的游戏中使用矢量资产。

I'm Flash/AS3 developer and I'm wondering how some iPhone developers use vector assets in their games.

例如,Lil'Pirates:这个游戏看起来像基于矢量,它很容易缩放和解开,但我无法获得有关在iOS上使用矢量资产的任何信息。

For example, "Lil' Pirates": this games looks like vector-based, it's zooming and unzooming easily, but I can't get any information about using vector assets at iOS.

推荐答案

Quartz 2D是一个非常轻量级的基于矢量图形的框架。它有很好的记录......

Quartz 2D is a pretty lightweight framework for vector based graphics. It's very well documented...

特别是我要特别注意分层和性能...

In particular I'd pay particular notice to layering and performance...

如果性能令人担忧,我也会阅读通过核心动画文档。核心动画使用CALayers将使用Quartz绘制的矢量缓存到内存中的位图。然后可以通过动画API转换和翻译这些CALayers。如果你打算进行大量的绘图,这就是我推荐的路线。

If performance is a worry I'd also have a read through the core animation documentation. Core animation uses CALayers to cache vectors drawn with Quartz to in-memory bitmaps. These CALayers can then be transformed and translated through the animation APIs. If you intend to perform a lot of drawing this is the route I would recommend.

这篇关于在iPhone游戏中使用矢量图形的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-29 21:49