CanvasHs: added shape helper function