Hello
here a DC24 II emulator display LUA bug except if someone is able to explain what is wrong
in the attached lua script. It's easy to reproduce. The two images are 128x128 pixels
(created with PIXresizer). Thanks to have a look.
Code:
local lGname = "Clipping"
local lMaps = ""
local clipW = 256
local clipH = 128
local clipX = 50
local clipY = 15
local png1
local png2
local function printForm(width, height)
if (png1 == nil) then png1 = lcd.loadImage(lMaps .. "/i1.jpg") end
if (png2 == nil) then png2 = lcd.loadImage(lMaps .. "/i2.jpg") end
if (png1 and png2) then
lcd.setClipping(clipX, clipY, clipW, clipH)
lcd.drawImage(95, 6, png1, 220)
lcd.drawImage(-33, 6, png2, 220)
lcd.resetClipping()
end
end
local function init()
local tmp, lEmul = system.getDeviceType()
if (lEmul == 1) then
lMaps = "F:/Imgs"
end
system.registerForm(1, MENU_MAIN, lGname, nil, nil, printForm)
end
collectgarbage()
return {init=init, author="Me", version="1.0", name=lGname}