0
我想確定能夠直接更改HTML5畫布圖像的所有方法的列表。到目前爲止,我的名單由fillRect
,stroke
,putImageData
組成,但我相信我錯過了一些。所有更改畫布圖像的畫布方法
我想確定能夠直接更改HTML5畫布圖像的所有方法的列表。到目前爲止,我的名單由fillRect
,stroke
,putImageData
組成,但我相信我錯過了一些。所有更改畫布圖像的畫布方法
我想許多的這些,你可以嘗試出來,並完成清單:
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"]
感謝,雖然是啊,你說好一些他們不會直接改變畫布圖像 – user730569
@ user730569搞清楚這只是搜索方法或試用或查看https://developer.mozilla.org/en/DOM/CanvasRenderingContext2D ...這對你來說是合適的任務,因爲你是一個關心這個信息,你不覺得嗎? ,p – Esailija