Shall be centered now?

This commit is contained in:
KikooDX 2020-04-25 11:16:34 +02:00
parent 232d7be94b
commit 65d2c3fc6b
3 changed files with 16 additions and 17 deletions

View File

@ -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()

View File

@ -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

File diff suppressed because one or more lines are too long