0

我想确定能够直接更改 HTML5 画布图像的所有方法的列表。到目前为止,我的列表由fillRect,组成strokeputImageData但我确信我遗漏了一些。

4

1 回答 1

1

我猜其中很多,您可以尝试一下并完成列表:

Object.getOwnPropertyNames( CanvasRenderingContext2D.prototype );

["putImageData",
"rect",
"setLineJoin",
"clearShadow",
"isPointInPath",
"strokeRect",
"createRadialGradient",
"drawImage",
"measureText",
"translate",
"setLineCap",
"arc",
"fillRect",
"setTransform",
"stroke",
"drawImageFromRect",
"setFillColor",
"createPattern",
"setAlpha",
"setShadow",
"strokeText",
"createLinearGradient",
"setCompositeOperation",
"fill",
"transform",
"rotate",
"quadraticCurveTo",
"setMiterLimit",
"clip",
"scale",
"arcTo",
"clearRect",
"bezierCurveTo",
"fillText",
"restore"]
于 2012-06-25T21:39:07.900 回答