在绘制资源受限的移动设备上研究了OpenVG标准中路径的绘制算法.该算法包括几何处理阶段的填充/描边算法、基于活性边的光栅化以及基于位图的缓冲区显示,实现了矢量图形的跨平台绘制.提出了基于曲率的曲线菲均匀细分法,通过基于拐点的曲线预处理、求取曲率较大的区间和各区间均匀细分3个步骤,减少了曲线细分和光栅化的计算量,而且生成曲线的光滑程度更高.老虎头和贺卡实例验证了绘制算法在移动设备上的可行性,非均匀细分法的绘制时间更短.
The rendering algorithm of path in OpenVG was focused for mobile devices with limited rendering resources. The proposed algorithm includes the filling and stroking of geometry operation, the rasterization based on active edge table, and the display of buffer data based on bitmap. Thus the rendering of vector graphics across multiple platforms was carried out. A non-uniform tessellate of Bézier curve based on curvature was presented. The tessellation algorithm is composed of pre-operation of curve based on inflection point, obtain of region with largest curvature, and uniform tessellation in each resulted region. The computations of tessellate and rasterization are reduced efficiently, and more smoothly visual quality can be observed. The running samples of tiger head and greeting card validated the feasibility of the vector graphics rendering algorithm. The running time of the non-uniform tessellate algorithm is shorter than the other algorithms.