Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
22
Task/Bitmap/Lua/bitmap-1.lua
Normal file
22
Task/Bitmap/Lua/bitmap-1.lua
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
function Allocate_Bitmap( width, height )
|
||||
local bitmap = {}
|
||||
for i = 1, width do
|
||||
bitmap[i] = {}
|
||||
for j = 1, height do
|
||||
bitmap[i][j] = {}
|
||||
end
|
||||
end
|
||||
return bitmap
|
||||
end
|
||||
|
||||
function Fill_Bitmap( bitmap, color )
|
||||
for i = 1, #bitmap do
|
||||
for j = 1, #bitmap[1] do
|
||||
bitmap[i][j] = color
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function Get_Pixel( bitmap, x, y )
|
||||
return bitmap[x][y]
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue