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="Pju", version="1.0", name=lGname}