File tree 1 file changed +15
-0
lines changed
1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -384,6 +384,21 @@ the <a>output bitmap</a> such that the user agent can subsequently draw onto a d
384
384
correct resolution. This also allows user agents to re-use the same output of the <a>output
385
385
bitmap</a> repeatably while the visual viewport is being zoomed for example.
386
386
387
+ Whenever <code> "currentColor"</code> is used as a color in the {{PaintRenderingContext2D}} API, it
388
+ is treated as opaque black.
389
+
390
+ <div class=example>
391
+ The code below will produce a solid black rectange.
392
+ <pre class=lang-javascript>
393
+ registerPaint('currentcolor' , class {
394
+ paint(ctx, size) {
395
+ ctx.fillStyle = 'currentColor' ;
396
+ ctx.fillRect(0, 0, size.width, size.height);
397
+ }
398
+ });
399
+ </pre>
400
+ </div>
401
+
387
402
<div algorithm>
388
403
When the user agent is to <dfn>create a PaintRenderingContext2D object</dfn> for a given |width|,
389
404
|height|, and |alpha|, it <em> must</em> run the following steps:
You can’t perform that action at this time.
0 commit comments