Skip to content

Compatibility Status

Zach Bjornson edited this page Jul 3, 2017 · 27 revisions

Canvas

Feature Status
toBlob() No support, see toBuffer()

getContext()

Feature Status
getContext('2d') (yes)
getContext('webgl') No support
getContext('webgl2') No support
2d alpha context attribute Proposed in #935

toDataURL()

Feature Status
image/png type 0.0.3
image/jpeg type 1.3.5 (2.0.0 on Windows)

⚠️ Non-standard APIs

Feature Status
`new Canvas(..., 'pdf') 0.11.0
`new Canvas(..., 'svg') 1.2.0
new Canvas(Backend) 2.0.0
pngStream() 0.0.2, returns a true Stream in 0.5.2
jpegStream() 0.9.0 (2.0.0 on Windows)
pdfStream() 1.5.0 TODO this is undocumented
toBuffer() 0.0.1
toBuffer('raw') 1.6.0
toBuffer(callback) (async) 0.0.3
toBuffer PNG filters, compression level 1.1.0
`toDataURL(callback) (async) 0.0.3
registerFont() 2.0.0

CanvasRenderingContext2D

Drawing rectangles

Feature Status
clearRect(), fillRect(), strokeRect() 0.0.1

Drawing text

Feature Status
fillText() 0.0.1
strokeText() 0.0.1
measureText() 0.0.1
measureText() returns advanced text metrics No support, Issue #694

Line styles

Feature Status
lineWidth 0.0.1
lineCap 0.0.1
lineJoin 0.0.1
miterLimit 0.0.1
getLineDash() 1.1.4
setLineDash() 1.1.4
lineDashOffset 1.1.4

Text styles

Feature Status
font 0.0.2
textAlign 0.0.2
textBaseline 0.0.2
🔬 direction No support

Fill and stroke styles

Feature Status
fillStyle 0.0.1
strokeStyle 0.0.1
#rgb, #rrggbb 0.0.1
rgb(), rgba() 0.0.1
hsl(), hsla() 1.2.0
transparent 0.0.1
rebeccapurple 1.2.0
#rgba, #rrggbbaa color No support

Gradients and patterns

Feature Status
createLinearGradient() 0.0.01
createRadialGradient() 0.0.01
createPattern() 0.10.0

Shadows

Feature Status
shadowBlur 0.0.1
shadowColor 0.0.1
shadowOffsetX 0.0.1
shadowOffsetY 0.0.1

Paths

Feature Status
beginPath(), closePath() 0.0.1
moveTo(), lineTo() 0.0.1
quadraticCurveTo(), bezierCurveTo() 0.0.1
arc() 0.0.1
arcTo() 0.3.0
🔬 ellipse() No support
rect() 0.0.1

Drawing paths

Feature Status
fill(), stroke() 0.0.1
drawFocusIfNeeded() No support, not applicable
scrollPathIntoView() No support, not applicable
clip() 0.0.1
isPointInPath() 0.0.1
isPointInStroke() No support

Transformations

Feature Status
🔬 currentTransform No support
rotate(), scale(), translate(), transform() 0.0.1
setTransform() 0.0.1
🔬 resetTransform() 0.0.1

Compositing

Feature Status
globalAlpha 0.0.1
globalCompositeOperation 0.0.1

Drawing images

Feature Status
drawImage() 0.0.8
ImageBitmap as source image No support

Pixel manipulation

Feature Status
createImageData() 0.1.0
getImageData() 0.1.0
putImageData() 0.1.0

Image smoothing

Feature Status
🔬 imageSmoothingEnabled 1.0.2

The canvas state

Feature Status
save() 0.0.1
restore() 0.0.1
canvas 0.0.1

Hit regions

Feature Status
addHitRegion(), removeHitRegion(), clearHitRegions() No support, not applicable

⚠️ Non-standard APIs

Feature Status
patternQuality
textDrawingMode
filter
additional global composite operators
antialias

ImageData

Feature Status
Basic support 0.1.0
imageData.data is a Uint8ClampedArray 1.2.8
ImageData() constructor 1.3.0

CanvasGradient

Feature Status
Basic support 0.1.0

CanvasPattern

Feature Status
Basic support 0.10.0
🔬 setTransform() No support

Image

Feature Status
Basic support 0.0.6
src = dataurl 0.8.0
⚠️ src = buffer 0.0.6
⚠️ dataMode 0.12.1

ImageBitmap, ImageBitmapFactories, ImageBitmapRenderingContext

No support, Issue #876