Canvas API supported by FlashCanvas
The following tables show the Canvas APIs supported by FlashCanvas. The current support status of ExplorerCanvas library is also shown for comparison. As for the concrete usage of these methods/attributes, please refer to the specifications listed below.
We will gradually backport the source code from FlashCanvas Pro to FlashCanvas. That means open-source version of FlashCanvas would support more Canvas APIs in the future.
HTMLCanvasElement
| ExplorerCanvas r73 | FlashCanvas | FlashCanvas Pro | |
|---|---|---|---|
| width | |||
| height | |||
| getContext() | |||
| toDataURL("image/png") | |||
| toDataURL("image/jpeg") |
CanvasRenderingContext2D
| ExplorerCanvas r73 | FlashCanvas | FlashCanvas Pro | |
|---|---|---|---|
| canvas | |||
| save() | |||
| restore() | |||
| scale() | |||
| rotate() | |||
| translate() | |||
| transform() | |||
| setTransform() | |||
| globalAlpha | |||
| globalCompositeOperation | |||
| strokeStyle | |||
| fillStyle | |||
| createLinearGradient() | |||
| createRadialGradient() | |||
| createPattern(img) | |||
| createPattern(canvas) | |||
| createPattern(video) | |||
| lineWidth | |||
| lineCap | |||
| lineJoin | |||
| miterLimit | |||
| shadowOffsetX | |||
| shadowOffsetY | |||
| shadowBlur | |||
| shadowColor | |||
| clearRect() | |||
| fillRect() | |||
| strokeRect() | |||
| beginPath() | |||
| closePath() | |||
| moveTo() | |||
| lineTo() | |||
| quadraticCurveTo() | |||
| bezierCurveTo() | |||
| arcTo() | |||
| rect() | |||
| arc() | |||
| fill() | |||
| stroke() | |||
| clip() | |||
| isPointInPath() | |||
| drawFocusRing() | |||
| font | |||
| textAlign | |||
| textBaseline | |||
| fillText() | |||
| strokeText() | |||
| measureText() | |||
| drawImage(img) | |||
| drawImage(canvas) | |||
| drawImage(video) | |||
| createImageData() | |||
| getImageData() | |||
| putImageData() |
- [1]. strokeStyle does not support CanvasPattern object.
- [2]. strokeStyle does not support CanvasPattern object when used with Flash Player 9.
- [3]. a. b. You cannot copy an image from hidden/offscreen canvases.
- [4]. clip() does not work for images and texts.
- [5]. a. b. Gradients and patterns are not supported yet.
- [6]. drawImage() still has some problems, so use it with care.
- [7]. a. b. getImageData()/putImageData() are very slow. The data transfer between JavaScript and Flash takes much time.