Fixed a bug on the handling of empty EncodedText.
This commit is contained in:
@@ -56,7 +56,9 @@ class OSGTEXT_EXPORT EncodedText : public osg::Referenced
|
||||
Encoding getEncoding() const { return _encoding; }
|
||||
|
||||
void setText(const unsigned char* text, int length = -1);
|
||||
std::vector<int>::const_iterator getUnicodeText() const { return _unicodeText.begin(); }
|
||||
|
||||
std::vector<int>::const_iterator begin() const { return _unicodeText.begin(); }
|
||||
std::vector<int>::const_iterator end() const { return _unicodeText.end(); }
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
@@ -121,8 +121,8 @@ class OSGTEXT_EXPORT Text : public osg::Drawable
|
||||
|
||||
const osg::Vec3& getAlignmentPos() const { return _alignmentPos; };
|
||||
|
||||
void setEncodedText(EncodedText* encodedText) { _encodedText = encodedText; }
|
||||
const EncodedText* getEncodedText() const { return _encodedText.get(); }
|
||||
void setEncodedText(EncodedText* encodedText) { _encodedText = encodedText; }
|
||||
const EncodedText* getEncodedText() const { return _encodedText.get(); }
|
||||
|
||||
protected:
|
||||
|
||||
@@ -155,7 +155,7 @@ class OSGTEXT_EXPORT Text : public osg::Drawable
|
||||
int _boundingBoxType;
|
||||
AxisAlignment _axisAlignment;
|
||||
|
||||
osg::ref_ptr<EncodedText> _encodedText;
|
||||
osg::ref_ptr<EncodedText> _encodedText;
|
||||
|
||||
osg::Vec3 _pos;
|
||||
osg::Vec3 _alignmentPos;
|
||||
|
||||
Reference in New Issue
Block a user