Add text in a specific text system

This commit is contained in:
Edouard Dupin 2012-01-13 13:07:15 +01:00
parent bc0afc31f8
commit 5f63c38eb8
2 changed files with 18 additions and 0 deletions

View File

@ -83,6 +83,23 @@ void ewol::OObject2DText::Text(etkFloat_t x, etkFloat_t y, const char* utf8Strin
m_coordTex.Clear();
if (m_FontId == -1) {
EWOL_ERROR("Font Id is not corectly defined");
return;
}
coord2D_ts drawPosition;
drawPosition.x = x;
drawPosition.y = y;
coord2D_ts clipSize;
clipSize.x = clippingPositionX;
clipSize.y = -1;
ewol::DrawText(m_FontId, drawPosition, clipSize, utf8String, m_FontTextureId, m_coord, m_coordTex);
}
void ewol::OObject2DText::TextAdd(etkFloat_t x, etkFloat_t y, const char* utf8String, int32_t clippingPositionX)
{
m_FontTextureId = 0;
if (m_FontId == -1) {
EWOL_ERROR("Font Id is not corectly defined");
return;
}
coord2D_ts drawPosition;
drawPosition.x = x;

View File

@ -38,6 +38,7 @@ namespace ewol {
virtual void Draw(void);
// set a specific text
void Text(etkFloat_t x, etkFloat_t y, const char* utf8String, int32_t clippingPositionX);
void TextAdd(etkFloat_t x, etkFloat_t y, const char* utf8String, int32_t clippingPositionX);
protected:
int32_t m_FontId; //!< font internal ID
color_ts m_textColorFg; //!< text color ...