--摘自《Game on Symbian Os》
Bitmap formats such as MBMs are suitable for photographic images and
simple icons, but tend to look jaggy when scaled either up or down. High
contrast edges, in particular, deteriorate when scaled down. Vector-based
graphics such as Flash and SVG can be scaled and rotated without loss
of quality. The geometric shapes and fills which make up the graphics
are recalculated and then rasterized as needed. Vector-based rendering
also deals effectively with the problem of screen rotation on a non-square
pixel display.
像MBM这样的位图格式适合于照片图像和简单图标,但是在缩放时会看起来参差不齐。特别是高对比度的边缘,缩小时更加糟糕。
基于矢量的图形如FLASH和SVG能被缩放和旋转而不失去图片质量。组成图形的几何形状和填充被按照需要重新计算和栅格化。
基于矢量的渲染也对屏幕旋转和非方形像素显示非常有效。
The benefits of SVG over MBMs can be seen clearly in Figure 3.18,
where the single shape definition has been drawn with anti-aliasing at
several sizes without deteriorating quality.
SVG之于MBM的好处清楚的显示在图3.18中,单个形状定义的绘制在不同的尺寸下反走样,不会破坏质量。
S60 has supported SVG icons since S60 2.8 and UIQ introduced SVG
icon for applications in UIQ 3.1. In S60, SVG icons are created by using
the Carbide.c++ IDE, which produces MIF files (an S60-specific way
of wrapping up SVG icons). Further information can be found in the
Carbide.c++ help files.
S60从 2.8开始支持SVG图标,UIQ在3.1引入支持。S60中,SVG图标由Carbide C++IDE创建,产生MIF文件(S60的方式包裹SVG图标)。
Within an S60 application, SVG icons can be loaded using the Akn-
IconUtils utility which returns a CFbsBitmap of the rendered SVG,
which can be used with the usual graphics context functions. Calling
AknIconUtils::SetSize() on the bitmap causes SVG icons to be
rendered at the new size.
在一个S60程序中,SVG图标能使用AknIconUtils工具载入,返回一个SVG渲染过的CFbsBitmap,可以被用于GC函数。
在此位图上调用AknIconUtils::SetSize()导致SVG图标以新尺寸被渲染。