码迷,mamicode.com
首页 > 其他好文 > 详细

renderer_base低级渲染器应用的时机

时间:2016-01-03 00:52:33      阅读:193      评论:0      收藏:0      [点我收藏+]

标签:agg render_base

1 前言

    该话题是由于讨论整型和浮点型的线宽之间的差异,从而引出的低级渲染器的出现时机,实际上主要是考虑到性能。

2 翻译

实际上,如果需要渲染1个像素宽度的横线或者竖线,通常和像素对齐,就是占满坐标格子)实际上,如果确定不需要使用AGG的任何转换,最好使用低级的渲染器render_base.

Actually, if you need to draw horizontal and vertical lines of exactly 1 pixel
width, always aligned to pixels (say, coordinate grid), and if you are
absolutely sure you won‘t need to transform them using AGG converters, it‘s
better to use low level renderer_base::copy_hline(), copy_vline(),
blend_hline(), blend_vline(), or, if you need to draw dashed/dotted lines,
blend_solid_hspan(), blend_solid_vspan(). The latest require an array of
"covers", that can be 0 for gaps and 255 for dashes. Intermediate values will
be drawn with respective opacity.


renderer_base低级渲染器应用的时机

标签:agg render_base

原文地址:http://linuxstorm.blog.51cto.com/5218690/1730931

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!