[osg-users] osgshxtext

Robert Osfield robert.osfield at gmail.com
Mon Oct 8 00:50:54 PDT 2018


HI Deping,

This seems like quite a niche feature so not appropriate for the core
OpenSceneGraph.  I would recommend create a small project for it on
github then others can pull it down and help develop it further

Cheers,
Robert.
On Mon, 8 Oct 2018 at 04:15, <cdp97531 at sina.com> wrote:
>
> 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-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


More information about the osg-users mailing list