Image.height readonly property
Get the height of the Image. The height starts from 0 (top side of the Image) and increase to the bottom direction.
Example
local ui = require "ui"
require "canvas"
-- create a simple Window
local win = ui.Window("Image.height sample", "fixed", 320, 200)
-- create a Canvas
local canvas = ui.Canvas(win)
canvas.align = "all"
local img = canvas:Image("LuaRT.png")
local ypos = -img.height
function canvas:onPaint()
self:begin()
self:clear()
img:draw(-60, ypos, 0.9)
ypos = ypos > canvas.height and -img.height or ypos+3
self:flip()
end
ui.run(win):wait()