在Lua中将表格显示为像素图像

时间:2019-01-06 18:22:54

标签: lua

将表格var显示为像素图像并将其保存在Lua中

我有一个表变量,它具有坐标和颜色。我想将其显示为图像。我尝试用Google搜索,但没有想要的结果。你对我有什么建议吗?

temp = {
    {x=0,y=0,color=0x7c78a7}, --Original coordinate and its color
    {x=-1,y=0,color=0x7c78a7}, --Relative coordinate and its color
    {x=-2,y=1,color=0x6c6897},
    {x=2,y=-2,color=0x6c6897},
    {x=-2,y=4,color=0x8af296},
    {x=-1,y=3,color=0x8af296},
    {x=3,y=4,color=0x8af296},
    {x=1,y=-5,color=0x8af296},
    {x=5,y=2,color=0x8af296},
    {x=-5,y=2,color=0x8af296},
    {x=2,y=5,color=0x6e6a99},
    {x=1,y=5,color=0x6e6a99},
    {x=-2,y=5,color=0x8af296},
    {x=-3,y=5,color=0x8af296},
    {x=3,y=5,color=0x8af296},
    {x=1,y=-1,color=0x8af296},
    {x=3,y=2,color=0x5d5a7d},
    {x=-3,y=2,color=0x5d5a7d},
    {x=-1,y=2,color=0x5d5a7d},
    {x=-2,y=2,color=0x5d5a7d}
}

0 个答案:

没有答案