c***@sina.com
2018-10-08 03:14:59 UTC
Hi OSG developers,
OSG is a great library, and I really like it.I have written a osg Node class which support display text in AutoCAD shape file.The source code is attached.I hope some developer can merge it into OSG after extending it to other platform than Windows.class ShxText's usage is like this:
osg::Geode* geode = new osg::Geode();
ShxText* pText = new ShxText(); pText->setCharacterSize(10); pText->SetText(L"Hello, Öйú"); pText->SetFontFile("txt.shx", "THFont.SHX");//THFont.shx pText->SetColor(osg::Vec3f(i / 100.f, j / 100.f, 1.f)); pText->build();
//auto pText = new osgText::Text; //pText->setText(L"Hello, Öйú"); //pText->setCharacterSize(10); //pText->setFont(font);
geode->addDrawable(pText);
Thanks,Deping Chen
OSG is a great library, and I really like it.I have written a osg Node class which support display text in AutoCAD shape file.The source code is attached.I hope some developer can merge it into OSG after extending it to other platform than Windows.class ShxText's usage is like this:
osg::Geode* geode = new osg::Geode();
ShxText* pText = new ShxText(); pText->setCharacterSize(10); pText->SetText(L"Hello, Öйú"); pText->SetFontFile("txt.shx", "THFont.SHX");//THFont.shx pText->SetColor(osg::Vec3f(i / 100.f, j / 100.f, 1.f)); pText->build();
//auto pText = new osgText::Text; //pText->setText(L"Hello, Öйú"); //pText->setCharacterSize(10); //pText->setFont(font);
geode->addDrawable(pText);
Thanks,Deping Chen