头文件:agg/include/agg_trans_single_path.h
源文件:agg/src/agg_trans_single_path.cpp
1 total_length统计路径长度
agg::path_storageps;
ps.move_to(100,20);
ps.line_to(10,200);
ps.line_to(200,200);
agg::trans_single_path tspath;
tspath.add_path(ps);
double nPathLen= tspath.total_length();
2 transform
暂时不清楚
agg::trans_single_path tcurve;
tcurve.add_path(m_path_storage);
double len = tcurve.total_length();
int n = 3;
double x = len / n;
couble y = 0;
tcurve.transform(&x, &y);
here x, y been transformed to the rightvalue.
总结:使用该类根据路径线段的方向来渲染文字,目前暂时不了解:
http://sourceforge.net/p/vector-agg/mailman/message/9964153/
时间: 2024-11-05 05:03:56