@@ -56,7 +56,6 @@ urlPrefix: https://html.spec.whatwg.org/multipage/; type: dfn;
56
56
text: reset the rendering context to its default state
57
57
text: output bitmap
58
58
text: set bitmap dimensions
59
- url: concept-canvas-alpha; text: alpha
60
59
urlPrefix: https://tc39.github.io/ecma262/#sec-; type: dfn;
61
60
text: constructor
62
61
text: Construct
@@ -362,6 +361,14 @@ A {{PaintRenderingContext2D}} object has a [=output bitmap=]. This is initialise
362
361
object is created. The size of the [=output bitmap=] is the size of the fragment it is
363
362
rendering.
364
363
364
+ A {{PaintRenderingContext2D}} object also has an <dfn for="PaintRenderingContext2D">alpha</dfn> flag,
365
+ which can be set to true or false.
366
+ Initially, when the context is created,
367
+ its alpha flag must be set to true.
368
+ When a {{PaintRenderingContext2D}} object has its alpha flag set to false,
369
+ then its alpha channel must be fixed to 1.0 (fully opaque) for all pixels,
370
+ and attempts to change the alpha component of any pixel must be silently ignored.
371
+
365
372
The size of the [=output bitmap=] does not necessarily represent the size of the actual bitmap
366
373
that the user agent will use internally or during rendering. For example, if the visual viewport is
367
374
zoomed the user agent may internally use bitmaps which correspond to the number of device pixels in
@@ -392,7 +399,7 @@ When the user agent is to <dfn>create a PaintRenderingContext2D object</dfn> for
392
399
|height|, and |paintRenderingContext2DSettings|, it <em> must</em> run the following steps:
393
400
1. Create a new {{PaintRenderingContext2D}} .
394
401
2. [=Set bitmap dimensions=] for the context's [=output bitmap=] to the rounded values of |width| and |height|.
395
- 3. Set the {{PaintRenderingContext2D}} 's [=alpha=] flag to |paintRenderingContext2DSettings|' s {{alpha}} .
402
+ 3. Set the {{PaintRenderingContext2D}} 's [=PaintRenderingContext2D/ alpha=] flag to |paintRenderingContext2DSettings|' s {{alpha}} .
396
403
4. Return the new {{PaintRenderingContext2D}} .
397
404
398
405
Note: The initial state of the rendering context is set inside the [=set bitmap dimensions=]
0 commit comments