RenderingContext Canvas.getContext(string contextType, Object contextAttributes)

    属性类型默认值必填说明
    antialiasbooleanfalse表示是否抗锯齿
    preserveDrawingBufferbooleanfalse表示是否绘图完成后是否保留绘图缓冲区
    antialiasSamplesnumber2抗锯齿样本数。最小值为 2,最大不超过系统限制数量,仅 iOS 支持

    返回值