OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // https://html.spec.whatwg.org/multipage/scripting.html#the-offscreen-2d-render
ing-context | 5 // https://html.spec.whatwg.org/multipage/scripting.html#the-offscreen-2d-render
ing-context |
6 | 6 |
7 [ | 7 [ |
8 Exposed=(Window,Worker), | 8 Exposed=(Window,Worker), |
9 RuntimeEnabled=ExperimentalCanvasFeatures, | 9 RuntimeEnabled=ExperimentalCanvasFeatures, |
10 ] interface OffscreenCanvasRenderingContext2D { | 10 ] interface OffscreenCanvasRenderingContext2D { |
11 // back-reference to the canvas | 11 // back-reference to the canvas |
12 [ImplementedAs=getOffscreenCanvas] readonly attribute OffscreenCanvas canvas
; | 12 [ImplementedAs=offscreenCanvas] readonly attribute OffscreenCanvas canvas; |
13 | 13 |
14 [CallWith=ScriptState, RaisesException] void commit(); | 14 [CallWith=ScriptState, RaisesException] Promise commit(); |
15 | 15 |
16 // state | 16 // state |
17 void save(); // push state on state stack | 17 void save(); // push state on state stack |
18 void restore(); // pop state stack and restore state | 18 void restore(); // pop state stack and restore state |
19 | 19 |
20 // transformations (default transform is the identity matrix) | 20 // transformations (default transform is the identity matrix) |
21 void scale(unrestricted double x, unrestricted double y); | 21 void scale(unrestricted double x, unrestricted double y); |
22 void rotate(unrestricted double angle); | 22 void rotate(unrestricted double angle); |
23 void translate(unrestricted double x, unrestricted double y); | 23 void translate(unrestricted double x, unrestricted double y); |
24 void transform(unrestricted double a, unrestricted double b, unrestricted do
uble c, unrestricted double d, unrestricted double e, unrestricted double f); | 24 void transform(unrestricted double a, unrestricted double b, unrestricted do
uble c, unrestricted double d, unrestricted double e, unrestricted double f); |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 attribute DOMString lineJoin; // "round", "bevel", "miter" (default "miter") | 83 attribute DOMString lineJoin; // "round", "bevel", "miter" (default "miter") |
84 attribute unrestricted double miterLimit; // (default 10) | 84 attribute unrestricted double miterLimit; // (default 10) |
85 | 85 |
86 // dashed lines | 86 // dashed lines |
87 void setLineDash(sequence<unrestricted double> dash); | 87 void setLineDash(sequence<unrestricted double> dash); |
88 sequence<unrestricted double> getLineDash(); | 88 sequence<unrestricted double> getLineDash(); |
89 attribute unrestricted double lineDashOffset; | 89 attribute unrestricted double lineDashOffset; |
90 }; | 90 }; |
91 | 91 |
92 OffscreenCanvasRenderingContext2D implements CanvasPathMethods; | 92 OffscreenCanvasRenderingContext2D implements CanvasPathMethods; |
OLD | NEW |