Canvas:

draw(action: ()=>void): void