Moved the remain inline osg::Font methods into Font.cpp to avoid problems with the
impossibly stupid visual studio compilers.
This commit is contained in:
parent
397edcd579
commit
efea365412
@ -60,8 +60,8 @@ public:
|
||||
/** Set the pixel width and height hint.*/
|
||||
virtual void setSize(unsigned int width, unsigned int height);
|
||||
|
||||
unsigned int getWidth() { return _width; }
|
||||
unsigned int getHeight() { return _height; }
|
||||
unsigned int getWidth();
|
||||
unsigned int getHeight();
|
||||
|
||||
/** Get a Glyph for specified charcode, and the font size nearest to the current font size hint.*/
|
||||
virtual Glyph* getGlyph(unsigned int charcode);
|
||||
@ -72,37 +72,36 @@ public:
|
||||
/** Return true if this font provides vertical alignments and spacing or glyphs.*/
|
||||
virtual bool hasVertical() const;
|
||||
|
||||
|
||||
/** Set the margin around each glyph,
|
||||
* to ensure that texture filtering doesn't bleed adjacent glyph's into each other.
|
||||
* Default margin is 2 texels.*/
|
||||
void setGlyphImageMargin(unsigned int margin) { _margin = margin; }
|
||||
unsigned int getGlyphImageMargin() const { return _margin; }
|
||||
void setGlyphImageMargin(unsigned int margin);
|
||||
unsigned int getGlyphImageMargin() const;
|
||||
|
||||
/** Set the size of texture to create to store the glyph images when rendering.
|
||||
* Note, this doesn't affect already created Texture Glhph's.*/
|
||||
void setTextureSizeHint(unsigned int width,unsigned int height);
|
||||
|
||||
unsigned int getTextureWidthHint() const { return _textureWidthHint; }
|
||||
unsigned int getTextureHeightHint() const { return _textureWidthHint; }
|
||||
unsigned int getTextureWidthHint() const;
|
||||
unsigned int getTextureHeightHint() const;
|
||||
|
||||
/** Set the minification texture filter to use when creating the texture to store the glyph images when rendering.
|
||||
* Note, this doesn't affect already created Texture Glhph's.*/
|
||||
void setMinFilterHint(osg::Texture::FilterMode mode);
|
||||
osg::Texture::FilterMode getMinFilterHint() const { return _minFilterHint; }
|
||||
osg::Texture::FilterMode getMinFilterHint() const;
|
||||
|
||||
/** Set the magnification texture filter to use when creating the texture to store the glyph images when rendering.
|
||||
* Note, this doesn't affect already created Texture Glhph's.*/
|
||||
void setMagFilterHint(osg::Texture::FilterMode mode);
|
||||
osg::Texture::FilterMode getMagFilterHint() const { return _magFilterHint; }
|
||||
osg::Texture::FilterMode getMagFilterHint() const;
|
||||
|
||||
// make Text a friend to allow it add and remove its entry in the Font's _textList.
|
||||
friend class FontImplementation;
|
||||
|
||||
void setImplementation(FontImplementation* implementation);
|
||||
|
||||
FontImplementation* getImplementation() { return _implementation.get(); }
|
||||
const FontImplementation* getImplementation() const { return _implementation.get(); }
|
||||
FontImplementation* getImplementation();
|
||||
const FontImplementation* getImplementation() const;
|
||||
|
||||
|
||||
protected:
|
||||
|
@ -99,6 +99,16 @@ void Font::setImplementation(FontImplementation* implementation)
|
||||
if (_implementation.valid()) _implementation->_facade = this;
|
||||
}
|
||||
|
||||
Font::FontImplementation* Font::getImplementation()
|
||||
{
|
||||
return _implementation.get();
|
||||
}
|
||||
|
||||
const Font::FontImplementation* Font::getImplementation() const
|
||||
{
|
||||
return _implementation.get();
|
||||
}
|
||||
|
||||
std::string Font::getFileName() const
|
||||
{
|
||||
if (_implementation.valid()) return _implementation->getFileName();
|
||||
@ -110,6 +120,66 @@ void Font::setSize(unsigned int width, unsigned int height)
|
||||
if (_implementation.valid()) _implementation->setSize(width, height);
|
||||
}
|
||||
|
||||
unsigned int Font::getWidth()
|
||||
{
|
||||
return _width;
|
||||
}
|
||||
|
||||
unsigned int Font::getHeight()
|
||||
{
|
||||
return _height;
|
||||
}
|
||||
|
||||
void Font::setGlyphImageMargin(unsigned int margin)
|
||||
{
|
||||
_margin = margin;
|
||||
}
|
||||
|
||||
unsigned int Font::getGlyphImageMargin() const
|
||||
{
|
||||
return _margin;
|
||||
}
|
||||
|
||||
void Font::setTextureSizeHint(unsigned int width,unsigned int height)
|
||||
{
|
||||
_textureWidthHint = width;
|
||||
_textureHeightHint = height;
|
||||
}
|
||||
|
||||
unsigned int Font::getTextureWidthHint() const
|
||||
{
|
||||
return _textureWidthHint;
|
||||
}
|
||||
|
||||
unsigned int Font::getTextureHeightHint() const
|
||||
{
|
||||
return _textureHeightHint;
|
||||
}
|
||||
|
||||
|
||||
void Font::setMinFilterHint(osg::Texture::FilterMode mode)
|
||||
{
|
||||
_minFilterHint = mode;
|
||||
}
|
||||
|
||||
osg::Texture::FilterMode Font::getMinFilterHint() const
|
||||
{
|
||||
return _minFilterHint;
|
||||
}
|
||||
|
||||
/** Set the magnification texture filter to use when creating the texture to store the glyph images when rendering.
|
||||
* Note, this doesn't affect already created Texture Glhph's.*/
|
||||
void Font::setMagFilterHint(osg::Texture::FilterMode mode)
|
||||
{
|
||||
_magFilterHint = mode;
|
||||
}
|
||||
|
||||
osg::Texture::FilterMode Font::getMagFilterHint() const
|
||||
{
|
||||
return _magFilterHint;
|
||||
}
|
||||
|
||||
|
||||
Font::Glyph* Font::getGlyph(unsigned int charcode)
|
||||
{
|
||||
SizeGlyphMap::iterator itr = _sizeGlyphMap.find(SizePair(_width,_height));
|
||||
|
@ -188,11 +188,11 @@ public:
|
||||
|
||||
|
||||
// constructor/initializer
|
||||
tri_stripper(const indices & TriIndices);
|
||||
inline tri_stripper(const indices & TriIndices);
|
||||
|
||||
// Settings functions
|
||||
void SetCacheSize(const size_t CacheSize = 16); // = 0 will disable the cache optimizer
|
||||
void SetMinStripSize(const size_t MinStripSize = 2);
|
||||
inline void SetCacheSize(const size_t CacheSize = 16); // = 0 will disable the cache optimizer
|
||||
inline void SetMinStripSize(const size_t MinStripSize = 2);
|
||||
|
||||
// Stripper
|
||||
void Strip(primitives_vector * out_pPrimitivesVector); // throw triangles_indices_error();
|
||||
|
Loading…
Reference in New Issue
Block a user