Shall be centered now?
This commit is contained in:
parent
232d7be94b
commit
65d2c3fc6b
5
demo.lua
5
demo.lua
|
@ -50,8 +50,9 @@ for i = 1, 12, 1 do
|
|||
end
|
||||
end
|
||||
|
||||
file:write("}\ndraw(", 192 - image_infos.width, ",", 96 - image_infos.height)
|
||||
file:write(",data,pallet,", image_infos.width, ")")
|
||||
file:write("}\ndraw(", math.floor(192 - image_infos.width / 2), ",")
|
||||
file:write(math.floor(96 - image_infos.height / 2), ",data,pallet,")
|
||||
file:write(image_infos.width, ")")
|
||||
end
|
||||
|
||||
file:close()
|
||||
|
|
4
draw.py
4
draw.py
|
@ -1,9 +1,7 @@
|
|||
from casioplot import set_pixel as S
|
||||
from casioplot import show_screen as R
|
||||
|
||||
def draw(data, pallet, width):
|
||||
x = 0
|
||||
y = 0
|
||||
def draw(x, y, data, pallet, width):
|
||||
for v in data:
|
||||
S(x, y, pallet[v])
|
||||
x += 1
|
||||
|
|
Loading…
Reference in New Issue