Skip to content

Commit

Permalink
Add Canvas2D context (#1500)
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel D. Beck <daniel@ddbeck.com>
  • Loading branch information
petele and ddbeck committed Aug 19, 2024
1 parent a8e48ff commit 6c0fd81
Show file tree
Hide file tree
Showing 14 changed files with 512 additions and 75 deletions.
6 changes: 6 additions & 0 deletions features/canvas-2d-alpha.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: 2D canvas opacity
description: The optional `alpha` parameter of a 2D canvas's `getContext()` method sets whether the canvas has an alpha transparency channel. If set to `false`, then this permits the browser to optimize compositing for an opaque canvas.
spec: https://html.spec.whatwg.org/multipage/canvas.html#concept-canvas-alpha
group: canvas
compat_features:
- api.HTMLCanvasElement.getContext.2d_context.options_alpha_parameter
13 changes: 13 additions & 0 deletions features/canvas-2d-alpha.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Generated from: canvas-2d-alpha.yml
# Do not edit this file by hand. Edit the source file instead!

status:
baseline: false
support:
chrome: "32"
chrome_android: "32"
edge: ≤79
firefox: "30"
firefox_android: "30"
compat_features:
- api.HTMLCanvasElement.getContext.2d_context.options_alpha_parameter
6 changes: 6 additions & 0 deletions features/canvas-2d-color-managment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: Color management for 2D canvas
description: The optional `colorSpace` parameter of a 2D canvas's `getContext()` method chooses the color representation, such as `"srgb"` or `"display-p3"`.
spec: https://html.spec.whatwg.org/multipage/canvas.html#concept-canvas-color-space
group: canvas
compat_features:
- api.HTMLCanvasElement.getContext.2d_context.options_colorSpace_parameter
13 changes: 13 additions & 0 deletions features/canvas-2d-color-managment.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Generated from: canvas-2d-color-managment.yml
# Do not edit this file by hand. Edit the source file instead!

status:
baseline: false
support:
chrome: "92"
chrome_android: "92"
edge: "92"
safari: "15.2"
safari_ios: "15.2"
compat_features:
- api.HTMLCanvasElement.getContext.2d_context.options_colorSpace_parameter
6 changes: 6 additions & 0 deletions features/canvas-2d-desynchronized.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: Desynchronized 2D canvas
description: The optional `desynchronized` parameter of a canvas's `getContext()` method permits the browser to draw a 2D canvas independently of the event loop. This can reduce drawing latency.
spec: https://html.spec.whatwg.org/multipage/canvas.html#concept-canvas-desynchronized
group: canvas
compat_features:
- api.HTMLCanvasElement.getContext.2d_context.options_desynchronized_parameter
13 changes: 13 additions & 0 deletions features/canvas-2d-desynchronized.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Generated from: canvas-2d-desynchronized.yml
# Do not edit this file by hand. Edit the source file instead!

status:
baseline: false
support:
chrome: "81"
chrome_android: "75"
edge: "79"
safari: "15"
safari_ios: "15"
compat_features:
- api.HTMLCanvasElement.getContext.2d_context.options_desynchronized_parameter
6 changes: 6 additions & 0 deletions features/canvas-2d-willreadfrequently.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: willReadFrequently
description: The optional `willReadFrequently` parameter of a canvas's `getContext()` method permits the browser to optimize for frequent `getImageData()` calls by avoiding hardware acceleration. Also known as multiple readback.
spec: https://html.spec.whatwg.org/multipage/canvas.html#concept-canvas-will-read-frequently
group: canvas
compat_features:
- api.HTMLCanvasElement.getContext.2d_context.options_willReadFrequently_parameter
13 changes: 13 additions & 0 deletions features/canvas-2d-willreadfrequently.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Generated from: canvas-2d-willreadfrequently.yml
# Do not edit this file by hand. Edit the source file instead!

status:
baseline: false
support:
chrome: "99"
chrome_android: "99"
edge: "99"
firefox: "28"
firefox_android: "28"
compat_features:
- api.HTMLCanvasElement.getContext.2d_context.options_willReadFrequently_parameter
83 changes: 83 additions & 0 deletions features/canvas-2d.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: 2D canvas
description: The `CanvasRenderingContext2D` API is the "2d" rendering context for the `<canvas>` element. It represents a flat, two-dimensional space for drawing graphics and animations.
spec: https://html.spec.whatwg.org/multipage/canvas.html#2dcontext
group: canvas
status:
compute_from: api.CanvasRenderingContext2D
compat_features:
- api.CanvasGradient
- api.CanvasGradient.addColorStop
- api.CanvasRenderingContext2D
- api.CanvasRenderingContext2D.arc
- api.CanvasRenderingContext2D.arcTo
- api.CanvasRenderingContext2D.beginPath
- api.CanvasRenderingContext2D.bezierCurveTo
- api.CanvasRenderingContext2D.canvas
- api.CanvasRenderingContext2D.clearRect
- api.CanvasRenderingContext2D.clip
- api.CanvasRenderingContext2D.closePath
- api.CanvasRenderingContext2D.createImageData
- api.CanvasRenderingContext2D.createLinearGradient
- api.CanvasRenderingContext2D.createPattern
- api.CanvasRenderingContext2D.createRadialGradient
- api.CanvasRenderingContext2D.direction
- api.CanvasRenderingContext2D.drawFocusIfNeeded
- api.CanvasRenderingContext2D.drawImage
- api.CanvasRenderingContext2D.ellipse
- api.CanvasRenderingContext2D.fill
- api.CanvasRenderingContext2D.fillRect
- api.CanvasRenderingContext2D.fillStyle
- api.CanvasRenderingContext2D.fillText
- api.CanvasRenderingContext2D.filter
- api.CanvasRenderingContext2D.font
- api.CanvasRenderingContext2D.fontKerning
- api.CanvasRenderingContext2D.fontStretch
- api.CanvasRenderingContext2D.fontVariantCaps
- api.CanvasRenderingContext2D.getContextAttributes
- api.CanvasRenderingContext2D.getImageData
- api.CanvasRenderingContext2D.getLineDash
- api.CanvasRenderingContext2D.getTransform
- api.CanvasRenderingContext2D.globalAlpha
- api.CanvasRenderingContext2D.globalCompositeOperation
- api.CanvasRenderingContext2D.imageSmoothingEnabled
- api.CanvasRenderingContext2D.imageSmoothingQuality
- api.CanvasRenderingContext2D.isPointInPath
- api.CanvasRenderingContext2D.isPointInStroke
- api.CanvasRenderingContext2D.letterSpacing
- api.CanvasRenderingContext2D.lineCap
- api.CanvasRenderingContext2D.lineDashOffset
- api.CanvasRenderingContext2D.lineJoin
- api.CanvasRenderingContext2D.lineTo
- api.CanvasRenderingContext2D.lineWidth
- api.CanvasRenderingContext2D.measureText
- api.CanvasRenderingContext2D.miterLimit
- api.CanvasRenderingContext2D.moveTo
- api.CanvasRenderingContext2D.putImageData
- api.CanvasRenderingContext2D.quadraticCurveTo
- api.CanvasRenderingContext2D.rect
- api.CanvasRenderingContext2D.resetTransform
- api.CanvasRenderingContext2D.restore
- api.CanvasRenderingContext2D.rotate
- api.CanvasRenderingContext2D.save
- api.CanvasRenderingContext2D.scale
- api.CanvasRenderingContext2D.setLineDash
- api.CanvasRenderingContext2D.setTransform
- api.CanvasRenderingContext2D.shadowBlur
- api.CanvasRenderingContext2D.shadowColor
- api.CanvasRenderingContext2D.shadowOffsetX
- api.CanvasRenderingContext2D.shadowOffsetY
- api.CanvasRenderingContext2D.stroke
- api.CanvasRenderingContext2D.strokeRect
- api.CanvasRenderingContext2D.strokeStyle
- api.CanvasRenderingContext2D.strokeText
- api.CanvasRenderingContext2D.textAlign
- api.CanvasRenderingContext2D.textBaseline
- api.CanvasRenderingContext2D.textRendering
- api.CanvasRenderingContext2D.transform
- api.CanvasRenderingContext2D.translate
- api.CanvasRenderingContext2D.wordSpacing
- api.TextMetrics
- api.TextMetrics.alphabeticBaseline
- api.TextMetrics.hangingBaseline
- api.TextMetrics.ideographicBaseline
- api.TextMetrics.width
Loading

0 comments on commit 6c0fd81

Please # to comment.