在iPhone游戏中使用矢量图形

时间:2022-11-21 10:27:34

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

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

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.

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

1 个解决方案

#1


7  

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

Quartz 2D是一个非常轻量级的基于矢量图形的框架。这是有据可查的......

Quartz Documentation

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

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

Quartz Layering and Performance

石英分层和性能

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.

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

#1


7  

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

Quartz 2D是一个非常轻量级的基于矢量图形的框架。这是有据可查的......

Quartz Documentation

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

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

Quartz Layering and Performance

石英分层和性能

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.

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