走样与抗锯齿

摘自:http://sourceforge.net/p/vector-agg/mailman/vector-agg-general/?viewmonth=200701&page=0

通过设置gamma的阀值来渲染锯齿,是否意味着并没有真正的进行aliased rasterizer?

因为我注意到有scanline_bin,renderer_scanline_bin_solid,但是没有

rasterizer_scanline_bin函数。

好的,,_bin版本函数比普通的函数进行了一些优化。你可以使用带gamma阀值的_aa版本

可以得到non-AA图片。在这种情况下_bin版本可能运行的更快些。你可以使用不带gamma阀值

的_bin版本,通过可以得到non-AA图片。但是你很可能想调整gamma。默认情况下,_bin版本会

清楚所有靠近边界的像素。gamma_threadhold(0.5)的原则是:如果像素的一半或者更多的部分,

被多边形覆盖住,那就不要显示该像素

> I am comfused here. For aliased rendering, you do it by setting gamma 

> threshold, which means there is no real aliased rasterizer? Because I noticed

> it has "scanline_bin", "renderer_scanline_bin_solid", but 

> NO "rasterizer_scanline_bin".


Well, the "_bin" versions are just a little bit optimized versions of general

ones. You can use the "_aa" versions with gamma_threshold and you will get the

non-AA picture. But in this case the "_bin" versions are supposed to work

faster. You can use just "_bin" without gamma_threshold and you also will get

the non-AA picture. But you probably will want to adjust this gamma. By default

the "_bin" will light all pixels that are "touched" by the polygon.

gamma_threshold(0.5) makes it close to the rule: "if half of a pixel or more is

covered by the polygon light this pixel".


你可能感兴趣的:(agg,抗锯齿,走样)