Helper function to construct canvases