lua/wrappers/gfx/lua_asset.cpp
/**
	 * Sets the scale nine state by name. This state is used to determine how the scale nine inner borders are used.
	 * 
	 * <table class='return_codes'>
	 *  <tr><td>none</td><td>Scale nine is turned off.</td></tr>
	 *  <tr><td>horizontal</td><td>Only the left_x and right_x values are used and the asset is stretched horizontally.</td></tr>
	 *  <tr><td>vertical</td><td>Only the top_y and bottom_y values are used and the asset is stretched vertically.</td></tr>
	 *  <tr><td>both</td><td>All 4 values are used and the asset can be stretched both horizontally and vertically.</td></tr>
	 * </table>
	 * 
	 * @param string state The state to set the scale nine system to.
	 * @returns am.asset This.
	 */
Sets the scale nine state by name. This state is used to determine how the scale nine inner borders are used.


noneScale nine is turned off.
horizontalOnly the left_x and right_x values are used and the asset is stretched horizontally.
verticalOnly the top_y and bottom_y values are used and the asset is stretched vertically.
bothAll 4 values are used and the asset can be stretched both horizontally and vertically.


@param string state The state to set the scale nine system to.
Sets the scale nine state by name . This state is used to determine how the scale nine inner borders are used . noneScale nine is turned off . horizontalOnly the left_x and right_x values are used and the asset is stretched horizontally . verticalOnly the top_y and bottom_y values are used and the asset is stretched vertically . bothAll 4 values are used and the asset can be stretched both horizontally and vertically . @param string state The state to set the scale nine system to .
int Asset_scale_nine_state(lua_State *lua)
	{
		Asset *asset = castUData<Asset>(lua, 1);
		if (asset)
		{
			if (lua_gettop(lua) == 1)
			{
				lua_pushstring(lua, ScaleNine::getStateName(asset->getScaleNineState()));
				return 1;
			}
			else if (lua_isstr(lua, 2))
			{
				ScaleNineState state = ScaleNine::getState(lua_tostring(lua, 2));
				asset->setScaleNineState(state);
				lua_first(lua);
			}
			return LuaState::expectedArgs(lua, "scale_nine_state", "string state");
		}
		return LuaState::expectedContext(lua, "scale_nine_state", "am.asset");
	}
int Asset_scale_nine_state ( lua_State * lua ) { Asset * asset = castUData < Asset > ( lua , 1 ) ; if ( asset ) { if ( lua_gettop ( lua ) == 1 ) { lua_pushstring ( lua , ScaleNine :: getStateName ( asset -> getScaleNineState ( ) ) ) ; return 1 ; } else if ( lua_isstr ( lua , 2 ) ) { ScaleNineState state = ScaleNine :: getState ( lua_tostring ( lua , 2 ) ) ; asset -> setScaleNineState ( state ) ; lua_first ( lua ) ; } return LuaState :: expectedArgs ( lua , " " , " " ) ; } return LuaState :: expectedContext ( lua , " " , " " ) ; }
Sets the scale nine state by name.
Sets the scale nine state by name .