简体   繁体   English

iPhone-iPhone / iPad的矢量格式

[英]iPhone - vectorial format for iPhone/iPad

What is the best vectorial format I can use to create resolution independent vectorial artwork for iPhone and iPad? 我可以用来为iPhone和iPad创建与分辨率无关的矢量插图的最佳矢量格式是什么? PDF? PDF?

I have to draw large images 1024x1300 images on a quartz context. 我必须在石英环境中绘制1024x1300的大图像。 Suppose I use PDF. 假设我使用PDF。 What technique would save more memory and consume less CPU: have the PNG image loaded and draw it on the quartz context or have the PDF loaded on the quartz context? 哪种技术可以节省更多的内存并消耗更少的CPU:已将PNG图像加载到石英上下文中并在其上绘制,还是将PDF加载到了石英上下文中?

thanks in advance. 提前致谢。

As usual 'it depends'. 与往常一样,“取决于”。

Using PNGs of that size will require 5MB of memory to keep them uncompressed in a buffer. 使用该大小的PNG需要5MB的内存,以使其在缓冲区中保持未压缩状态。 This may be fine for your app. 这可能适合您的应用。

Memory usage of a PDF document is very dependent on the complexity of that document. PDF文档的内存使用非常依赖于该文档的复杂性。 In my experience vector graphics and text are pretty efficient. 以我的经验,矢量图形和文本非常有效。 Specially when rendered to a Layer. 特别是在渲染到图层时。

I think you will simply have to put together a small proof-of-concept app and run it in Instruments to get some real numbers. 我认为您只需要组装一个小型的概念验证应用程序并在Instruments中运行它即可获得一些实数。

The Opacity image editor allows you to draw vector graphics, and output Quartz2D code that you can then use to duplicate the image at any size on any iOS device: Opacity图像编辑器允许您绘制矢量图形,并输出Quartz2D代码,然后您可以使用该代码在任何iOS设备上以任意大小复制图像:

http://likethought.com/opacity/ http://likethought.com/opacity/

It would be blazing fast and use almost no memory (well, a large CALayer will consume memory) 它将迅速燃烧并且几乎不使用内存(嗯,一个大的CALayer将消耗内存)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM