Added vertex creation code to mask-canvas.