void GLGraphics2D::drawText(Vec2f const& pos , char const* str) { if ( !mFont ) return; int fontSize = mFont->getSize(); float ox = pos.x; float oy = pos.y + fontSize; drawTextImpl(ox, oy, str); }
void GLGraphics2D::drawText(Vec2f const& pos , Vec2f const& size , char const* str , bool beClip /*= false */) { if ( !mFont ) return; int fontSize = mFont->getSize(); int strLen = strlen( str ); float ox = pos.x + ( size.x - ( 3 * fontSize / 4 ) * strLen ) / 2 ; float oy = pos.y + fontSize + ( size.y - fontSize ) / 2; drawTextImpl(ox, oy, str); }
void RenderManagerSDL::drawText(const std::string& text, Vector2 position, unsigned int flags) { drawTextImpl(text, position, flags); }