[osg-users] osgshxtext

cdp97531 at sina.com cdp97531 at sina.com
Sun Oct 7 20:14:59 PDT 2018


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20181008/6a571ba9/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: osgshxtext.7z
Type: application/octet-stream
Size: 12112 bytes
Desc: not available
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20181008/6a571ba9/attachment.obj>


More information about the osg-users mailing list