一些不常用的坐標(biāo)轉(zhuǎn)換管道

5 agg::conv_smooth_poly1_curve圓滑過渡多邊形各頂點(貝塞爾)?
頭文件:#include"agg/include/agg_conv_smooth_poly1.h"?
基本定義:?
template<class VertexSource>?
struct conv_smooth_poly1_curve :?
publicconv_curve<conv_smooth_poly1<VertexSource> >?
構(gòu)造參數(shù)為VertexSource,smooth_value屬性決定圓滑度(默認(rèn)為1)?
簡單應(yīng)用例子:?
agg::path_storage ps;?
ps.move_to(100,200);?
ps.line_to(300,500);?
ps.line_to(400,400);?
ps.close_polygon(true);?
agg::conv_smooth_poly1_curve<agg::path_storage> cspc(ps);?
ras.add_path(cspc);?
6 agg::conv_bspline圓滑過渡多義線各頂點(貝塞爾)?
這里需要聲明多義線的概念:?
就是通常說的多段線,它是線段的組合體而已。比如說“Z”字形的線條,如果是用線段畫的話,那么就有三條線段。實際上多邊形是多義線的一種,一種多義線。?
頭文件:#include"agg/include/agg_conv_bspline.h"?
基本定義:?
template<class VertexSource>?
structconv_bspline : public conv_adaptor_vcgen<VertexSource, vcgen_bspline>?
構(gòu)造函數(shù)為VertexSource,interpolation_step屬性決定步長?
例子:?
?agg::path_storage ps;?
?ps.move_to(100,200);?
?ps.line_to(300,500);?
?ps.line_to(400,400);?
?//ps.close_polygon(true);//一個非常奇怪的圖案?
?agg::conv_stroke<agg::path_storage>stroke(ps);?
agg::conv_bspline<agg::conv_stroke<agg::path_storage> >cbsp(stroke);?
?ras.add_path(cbsp);?
6 agg::conv_marker建立標(biāo)記詳細(xì)參考箭頭?
7 agg::conv_curve可識別VertexSource中的曲線信息構(gòu)造參數(shù)為VertexSource,conv_smooth_poly1_curve就是基于它實現(xiàn)的。例程里的頂點沒有曲線的信息,在文字輸出時會用到她的。
了解更多網(wǎng)絡(luò)知識關(guān)注:http://www.vecloud.com/