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("Canvas.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:clear() img:draw(-60, ypos, 0.9) ypos = ypos > canvas.height and -img.height or ypos+3 end win:show() -- update user interface repeat ui.update() until not win.visible