Added encoding and font setting to dxfText as a first step towards making these user controllable to enble handling of non default settings
This commit is contained in:
parent
457d12d9b2
commit
d969516595
@ -910,10 +910,10 @@ dxfText::drawScene(scene* sc)
|
|||||||
sc->ocs(m);
|
sc->ocs(m);
|
||||||
|
|
||||||
ref_ptr<osgText::Text> _text = new osgText::Text;
|
ref_ptr<osgText::Text> _text = new osgText::Text;
|
||||||
_text->setText(_string);
|
_text->setText(_string, encoding);
|
||||||
|
_text->setFont(font);
|
||||||
|
|
||||||
_text->setCharacterSize( _height, 1.0/_xscale );
|
_text->setCharacterSize( _height, 1.0/_xscale );
|
||||||
_text->setFont("arial.ttf");
|
|
||||||
|
|
||||||
Quat qr( DegreesToRadians(_rotation), Z_AXIS );
|
Quat qr( DegreesToRadians(_rotation), Z_AXIS );
|
||||||
|
|
||||||
|
@ -293,6 +293,8 @@ class dxfText : public dxfBasicEntity
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
dxfText() :
|
dxfText() :
|
||||||
|
encoding(osgText::String::ENCODING_ASCII),
|
||||||
|
font("arial.ttf"),
|
||||||
_string(""),
|
_string(""),
|
||||||
_point1(0,0,0),
|
_point1(0,0,0),
|
||||||
_point2(0,0,0),
|
_point2(0,0,0),
|
||||||
@ -310,6 +312,10 @@ public:
|
|||||||
virtual void assign(dxfFile* dxf, codeValue& cv);
|
virtual void assign(dxfFile* dxf, codeValue& cv);
|
||||||
virtual void drawScene(scene* sc);
|
virtual void drawScene(scene* sc);
|
||||||
|
|
||||||
|
// application settings
|
||||||
|
osgText::String::Encoding encoding;
|
||||||
|
std::string font;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
std::string _string; // 1
|
std::string _string; // 1
|
||||||
osg::Vec3d _point1; // 10,20,30
|
osg::Vec3d _point1; // 10,20,30
|
||||||
|
Loading…
Reference in New Issue
Block a user