Added optional width and height to canvas