lua/wrappers/gfx/lua_font.cpp
/**
	 * Measures the space in pixels that the given word.
	 *
	 * @param string word The word to measure.
	 * @returns number The width that would be taken up.
	 * @returns number The height that would be taken up.
	 */
Measures the space in pixels that the given word.
@param string word The word to measure.
@returns number The width that would be taken up.
@returns number The height that would be taken up.
Measures the space in pixels that the given word . @param string word The word to measure . @returns number The width that would be taken up . @returns number The height that would be taken up .
int Font_measure_word(lua_State *lua)
	{
		Font *font = castUData<Font>(lua, 1);
		if (font)
		{
			if (lua_isnum(lua, 2))
			{
				float width = 0.0f, height = 0.0f;
				font->measureWord(lua_tostring(lua, 2), width, height);
				lua_pushnumber(lua, width);
				lua_pushnumber(lua, height);
				return 2;
			}
			return LuaState::expectedArgs(lua, "measure_word", "string text");
		}
		return LuaState::expectedContext(lua, "measure_word", "am.font");
	}
int Font_measure_word ( lua_State * lua ) { Font * font = castUData < Font > ( lua , 1 ) ; if ( font ) { if ( lua_isnum ( lua , 2 ) ) { float width = 0.0f , height = 0.0f ; font -> measureWord ( lua_tostring ( lua , 2 ) , width , height ) ; lua_pushnumber ( lua , width ) ; lua_pushnumber ( lua , height ) ; return 2 ; } return LuaState :: expectedArgs ( lua , " " , " " ) ; } return LuaState :: expectedContext ( lua , " " , " " ) ; }
Measures the space in pixels that the given word.
Measures the space in pixels that the given word .