| 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=offscreenCanvas] readonly attribute OffscreenCanvas canvas; | 12 [ImplementedAs=offscreenCanvasForBinding] readonly attribute OffscreenCanvas
canvas; |
| 13 | 13 |
| 14 [CallWith=ScriptState, RaisesException] Promise 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); |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 attribute DOMString lineJoin; // "round", "bevel", "miter" (default "miter") | 89 attribute DOMString lineJoin; // "round", "bevel", "miter" (default "miter") |
| 90 attribute unrestricted double miterLimit; // (default 10) | 90 attribute unrestricted double miterLimit; // (default 10) |
| 91 | 91 |
| 92 // dashed lines | 92 // dashed lines |
| 93 void setLineDash(sequence<unrestricted double> dash); | 93 void setLineDash(sequence<unrestricted double> dash); |
| 94 sequence<unrestricted double> getLineDash(); | 94 sequence<unrestricted double> getLineDash(); |
| 95 attribute unrestricted double lineDashOffset; | 95 attribute unrestricted double lineDashOffset; |
| 96 }; | 96 }; |
| 97 | 97 |
| 98 OffscreenCanvasRenderingContext2D implements CanvasPath; | 98 OffscreenCanvasRenderingContext2D implements CanvasPath; |
| OLD | NEW |