Moved Font code across to using FontSizePair internally and on Font methods, but
still using original implemetations.
This commit is contained in:
@@ -98,7 +98,7 @@ public:
|
||||
const osg::StateSet* getStateSet() const { return _stateset.get(); }
|
||||
|
||||
/** Set the pixel width and height hint.*/
|
||||
virtual void setFontResolution(unsigned int width, unsigned int height);
|
||||
virtual void setFontResolution(const FontSizePair& fontSize);
|
||||
|
||||
unsigned int getFontWidth() const;
|
||||
unsigned int getFontHeight() const;
|
||||
@@ -211,7 +211,7 @@ public:
|
||||
virtual std::string getFileName() const = 0;
|
||||
|
||||
/** Set the pixel width and height hint.*/
|
||||
virtual void setFontResolution(unsigned int width, unsigned int height) = 0;
|
||||
virtual void setFontResolution(const FontSizePair& fontSize) = 0;
|
||||
|
||||
/** Get a Glyph for specified charcode, and the font size nearest to the current font size hint.*/
|
||||
virtual Glyph* getGlyph(unsigned int charcode) = 0;
|
||||
|
||||
@@ -41,8 +41,8 @@ public:
|
||||
* the closest supported font size will be selected.*/
|
||||
void setFontResolution(unsigned int width, unsigned int height);
|
||||
|
||||
unsigned int getFontWidth() const { return _fontWidth; }
|
||||
unsigned int getFontHeight() const { return _fontHeight; }
|
||||
unsigned int getFontWidth() const { return _fontSize.first; }
|
||||
unsigned int getFontHeight() const { return _fontSize.second; }
|
||||
|
||||
|
||||
/** Set the text using a osgText::String.*/
|
||||
@@ -239,8 +239,7 @@ protected:
|
||||
|
||||
|
||||
// members which have public access.
|
||||
unsigned int _fontWidth;
|
||||
unsigned int _fontHeight;
|
||||
FontSizePair _fontSize;
|
||||
float _characterHeight;
|
||||
float _characterAspectRatio;
|
||||
CharacterSizeMode _characterSizeMode;
|
||||
|
||||
Reference in New Issue
Block a user