本文整理汇总了C++中THLine类的典型用法代码示例。如果您正苦于以下问题:C++ THLine类的具体用法?C++ THLine怎么用?C++ THLine使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了THLine类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: l_set_width
static int l_set_width(lua_State *L)
{
THLine* pLine = luaT_testuserdata<THLine>(L);
pLine->setWidth(luaL_optnumber(L, 2, 1));
lua_settop(L, 1);
return 1;
}
示例2: l_line_to
static int l_line_to(lua_State *L)
{
THLine* pLine = luaT_testuserdata<THLine>(L);
pLine->lineTo(luaL_optnumber(L, 2, 0), luaL_optnumber(L, 3, 0));
lua_settop(L, 1);
return 1;
}
示例3: l_set_colour
static int l_set_colour(lua_State *L)
{
THLine* pLine = luaT_testuserdata<THLine>(L);
pLine->setColour(luaL_optint(L, 2, 0), luaL_optint(L, 3, 0), luaL_optint(L, 4, 0), luaL_optint(L, 5, 255));
lua_settop(L, 1);
return 1;
}
示例4: l_line_depersist
static int l_line_depersist(lua_State *L)
{
THLine* pLine = luaT_testuserdata<THLine>(L);
lua_settop(L, 2);
lua_insert(L, 1);
LuaPersistReader* pReader = (LuaPersistReader*)lua_touserdata(L, 1);
pLine->depersist(pReader);
return 0;
}
示例5: l_line_draw
static int l_line_draw(lua_State *L)
{
THLine* pLine = luaT_testuserdata<THLine>(L);
THRenderTarget* pCanvas = luaT_testuserdata<THRenderTarget>(L, 2);
pLine->draw(pCanvas, static_cast<int>(luaL_optinteger(L, 3, 0)), static_cast<int>(luaL_optinteger(L, 4, 0)));
lua_settop(L, 1);
return 1;
}
示例6: l_set_colour
static int l_set_colour(lua_State *L)
{
THLine* pLine = luaT_testuserdata<THLine>(L);
pLine->setColour(static_cast<uint8_t>(luaL_optinteger(L, 2, 0)),
static_cast<uint8_t>(luaL_optinteger(L, 3, 0)),
static_cast<uint8_t>(luaL_optinteger(L, 4, 0)),
static_cast<uint8_t>(luaL_optinteger(L, 5, 255)));
lua_settop(L, 1);
return 1;
}