Hi,
I have investigated it and everything works correctly. You can use this script to test it :
local ui = require "ui"
require "canvas"
local win = ui.Window("Canvas parent test")
local panel = ui.Panel(win)
ui.Label(panel, "Panel", 4, 4).fgcolor = 0xFFFFFF
panel.bgcolor = 0x604050
panel:center()
local canvas = ui.Canvas(panel, 0, 0, 100, 100)
canvas.bgcolor = 0xF04040FF
canvas.color = 0xFFFFFFFF
canvas:center()
local btn = ui.Button(win, "Move the panel")
btn:center()
btn.y = panel.y + panel.width + 12
function btn:onClick()
panel.x = math.random(0, win.width-panel.width)
panel.y = math.random(0, win.height-panel.height-42)
btn.y = panel.y + panel.width + 12
btn.x = panel.x + 42
end
function canvas:onPaint()
self:begin()
self:clear()
self:print("Canvas", 4, 4)
self:flip()
end
ui.run(win):wait()