| VRS - The Virtual Rendering System |
| version 3.3 |
#include <vrs/text/fonttexture.h>

Public Member Functions | |
| FontTexture (unsigned int textureSize, SO< FontDefinition > fontDefinition, bool colored=false) | |
| Constructor. | |
| virtual | ~FontTexture () |
| Destructor. | |
| unsigned int | getTextureSize () const |
| Return the texture size. | |
| SO< FontDefinition > | getFontDefinition () const |
| Returns the FontDefinition. | |
| TextureGL * | getTexture () |
| Returns the VRS Texture. | |
| MemoryImage * | getImage () const |
| Returns the Image. | |
| bool | hasEnoughFreeSpace (SO< Image > img) const |
| Checks if the image would fit on this texture. | |
| bool | hasEnoughFreeSpace (const FT_Bitmap &bitmap) const |
| Checks if the bitmap would fit on this texture. | |
| bool | hasEnoughFreeSpace (int width, int height) const |
| Checks if there is enough space to fit a quad with the given bounds. | |
| void | addGlyphToTexture (const FT_Bitmap &bitmap, unsigned int *uv=NULL) |
| Renders a bitmap font on the next free place. | |
| void | addImageToTexture (SO< Image > img, unsigned int *uv=NULL) |
| Renders an image on the next free place. | |
| void | writeToPng (const std::string &filename) |
| Saves this texture as a png. | |
| VRS_TYPEINFO (FontTexture, SharedObj) | |
| VRS::TEXT::FontTexture::FontTexture | ( | unsigned int | textureSize, | |
| SO< FontDefinition > | fontDefinition, | |||
| bool | colored = false | |||
| ) |
Constructor.
| texturesize | ||
| fontDefinition | The Font to which this texture belongs | |
| colored | Use RGBA instead of just an Alpha Channel |
| virtual VRS::TEXT::FontTexture::~FontTexture | ( | ) | [virtual] |
Destructor.
| unsigned int VRS::TEXT::FontTexture::getTextureSize | ( | ) | const [inline] |
Return the texture size.
| SO<FontDefinition> VRS::TEXT::FontTexture::getFontDefinition | ( | ) | const [inline] |
Returns the FontDefinition.
| MemoryImage* VRS::TEXT::FontTexture::getImage | ( | ) | const [inline] |
Returns the Image.
Checks if the image would fit on this texture.
| bool VRS::TEXT::FontTexture::hasEnoughFreeSpace | ( | const FT_Bitmap & | bitmap | ) | const |
Checks if the bitmap would fit on this texture.
| bool VRS::TEXT::FontTexture::hasEnoughFreeSpace | ( | int | width, | |
| int | height | |||
| ) | const |
Checks if there is enough space to fit a quad with the given bounds.
| void VRS::TEXT::FontTexture::addGlyphToTexture | ( | const FT_Bitmap & | bitmap, | |
| unsigned int * | uv = NULL | |||
| ) |
Renders a bitmap font on the next free place.
| bitmap | The BitmapFont to draw | |
| uv | A unsigned int[2] for xpos, ypos if NULL ignored |
Renders an image on the next free place.
| img | The Image to draw | |
| uv | A unsigned int[2] for xpos, ypos if NULL ignored |
| void VRS::TEXT::FontTexture::writeToPng | ( | const std::string & | filename | ) |
Saves this texture as a png.
| VRS::TEXT::FontTexture::VRS_TYPEINFO | ( | FontTexture | , | |
| SharedObj | ||||
| ) |