高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】f Vectorizing
ttf vectorizing
ttf vectorizing
hi,
i am trying to vectorize text and used an example i found in the forum by creating my own vectorizer class and calling the draw function as below
class myvectorizer : public odgigeometrysimplifier, public odgibasevectorizer
{
public:
void polylineout(odint32 n, const odgepoint3d* pts)
{
}
}
then
odstaticrxobject<myvectorizer> dv;
odstaticrxobject<odgicontextfordbdatabase> gicontext;
gicontext.setdatabase(ptext->database());
dv.setdrawcontext(&dv);
dv.setcontext(&gicontext);
dv.output().setdestgeometry(dv);
dv.draw(ptext);
this works fine for shx fonts but it causes a system.stackoverflowexception for ttf fonts.
i have tried calling textproc directly and calculating the up and direction vectors but this has the same result unless i set the direction vector to (0, 0, 0). but this produces incorrect vectorization.
i am using vc8 and dd 2.6.8 in a managed environment.
what is causing this and how can i get it to work?
thanks
shx fonts produce mostly polylines but ttf produce polygons. check your polygonout function.
hi,
thanks for the advice..
i was trying to get the polygons but i was overriding polygonproc instead.
this now works with polygonout
thanks
|