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 // Note: The official spec is WIP at wiki.whatwg.org/wiki/OffscreenCanvas. | 5 // Note: The official spec is WIP at wiki.whatwg.org/wiki/OffscreenCanvas. |
6 | 6 |
7 [ | 7 [ |
8 Exposed=(Window,Worker), | 8 Exposed=(Window,Worker), |
9 RuntimeEnabled=ExperimentalCanvasFeatures, | 9 RuntimeEnabled=ExperimentalCanvasFeatures, |
10 ] interface OffscreenCanvasRenderingContext2D { | 10 ] interface OffscreenCanvasRenderingContext2D { |
(...skipping 30 matching lines...) Expand all Loading... |
41 | 41 |
42 // Line caps/joins | 42 // Line caps/joins |
43 attribute unrestricted double lineWidth; // (default 1) | 43 attribute unrestricted double lineWidth; // (default 1) |
44 attribute DOMString lineCap; // "butt", "round", "square" (default "butt") | 44 attribute DOMString lineCap; // "butt", "round", "square" (default "butt") |
45 attribute DOMString lineJoin; // "round", "bevel", "miter" (default "miter") | 45 attribute DOMString lineJoin; // "round", "bevel", "miter" (default "miter") |
46 attribute unrestricted double miterLimit; // (default 10) | 46 attribute unrestricted double miterLimit; // (default 10) |
47 | 47 |
48 // dashed lines | 48 // dashed lines |
49 void setLineDash(sequence<unrestricted double> dash); | 49 void setLineDash(sequence<unrestricted double> dash); |
50 sequence<unrestricted double> getLineDash(); | 50 sequence<unrestricted double> getLineDash(); |
51 attribute unrestricted double lineDashOffset; | 51 attribute unrestricted double lineDashOffset; |
52 | 52 |
53 // state | 53 // state |
54 void save(); // push state on state stack | 54 void save(); // push state on state stack |
55 void restore(); // pop state stack and restore state | 55 void restore(); // pop state stack and restore state |
56 | 56 |
57 // transformations (default transform is the identity matrix) | 57 // transformations (default transform is the identity matrix) |
58 void scale(unrestricted double x, unrestricted double y); | 58 void scale(unrestricted double x, unrestricted double y); |
59 void rotate(unrestricted double angle); | 59 void rotate(unrestricted double angle); |
60 void translate(unrestricted double x, unrestricted double y); | 60 void translate(unrestricted double x, unrestricted double y); |
61 void transform(unrestricted double a, unrestricted double b, unrestricted do
uble c, unrestricted double d, unrestricted double e, unrestricted double f); | 61 void transform(unrestricted double a, unrestricted double b, unrestricted do
uble c, unrestricted double d, unrestricted double e, unrestricted double f); |
(...skipping 14 matching lines...) Expand all Loading... |
76 [RaisesException] ImageData createImageData(ImageData imagedata); | 76 [RaisesException] ImageData createImageData(ImageData imagedata); |
77 [RaisesException] ImageData createImageData(double sw, double sh); | 77 [RaisesException] ImageData createImageData(double sw, double sh); |
78 [RaisesException] ImageData getImageData(double sx, double sy, double sw, do
uble sh); | 78 [RaisesException] ImageData getImageData(double sx, double sy, double sw, do
uble sh); |
79 [RaisesException] void putImageData(ImageData imagedata, double dx, double d
y); | 79 [RaisesException] void putImageData(ImageData imagedata, double dx, double d
y); |
80 [RaisesException] void putImageData(ImageData imagedata, double dx, double d
y, double dirtyX, double dirtyY, double dirtyWidth, double dirtyHeight); | 80 [RaisesException] void putImageData(ImageData imagedata, double dx, double d
y, double dirtyX, double dirtyY, double dirtyWidth, double dirtyHeight); |
81 | 81 |
82 [Exposed=Window] attribute DOMString filter; | 82 [Exposed=Window] attribute DOMString filter; |
83 }; | 83 }; |
84 | 84 |
85 OffscreenCanvasRenderingContext2D implements CanvasPathMethods; | 85 OffscreenCanvasRenderingContext2D implements CanvasPathMethods; |
OLD | NEW |