| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 void restore(); // pop state stack and restore state | 53 void restore(); // pop state stack and restore state |
| 54 | 54 |
| 55 // transformations (default transform is the identity matrix) | 55 // transformations (default transform is the identity matrix) |
| 56 void scale(unrestricted double x, unrestricted double y); | 56 void scale(unrestricted double x, unrestricted double y); |
| 57 void rotate(unrestricted double angle); | 57 void rotate(unrestricted double angle); |
| 58 void translate(unrestricted double x, unrestricted double y); | 58 void translate(unrestricted double x, unrestricted double y); |
| 59 void transform(unrestricted double a, unrestricted double b, unrestricted do
uble c, unrestricted double d, unrestricted double e, unrestricted double f); | 59 void transform(unrestricted double a, unrestricted double b, unrestricted do
uble c, unrestricted double d, unrestricted double e, unrestricted double f); |
| 60 void setTransform(unrestricted double a, unrestricted double b, unrestricted
double c, unrestricted double d, unrestricted double e, unrestricted double f); | 60 void setTransform(unrestricted double a, unrestricted double b, unrestricted
double c, unrestricted double d, unrestricted double e, unrestricted double f); |
| 61 void resetTransform(); | 61 void resetTransform(); |
| 62 | 62 |
| 63 // image smoothing |
| 64 attribute boolean imageSmoothingEnabled; // (default True) |
| 65 attribute ImageSmoothingQuality imageSmoothingQuality; // (default "low") |
| 66 |
| 63 // shadows | 67 // shadows |
| 64 attribute unrestricted double shadowOffsetX; | 68 attribute unrestricted double shadowOffsetX; |
| 65 attribute unrestricted double shadowOffsetY; | 69 attribute unrestricted double shadowOffsetY; |
| 66 attribute unrestricted double shadowBlur; | 70 attribute unrestricted double shadowBlur; |
| 67 attribute DOMString shadowColor; | 71 attribute DOMString shadowColor; |
| 68 | 72 |
| 69 // pixel manipulation | 73 // pixel manipulation |
| 70 [RaisesException] ImageData createImageData(ImageData imagedata); | 74 [RaisesException] ImageData createImageData(ImageData imagedata); |
| 71 [RaisesException] ImageData createImageData(double sw, double sh); | 75 [RaisesException] ImageData createImageData(double sw, double sh); |
| 72 [RaisesException] ImageData getImageData(double sx, double sy, double sw, do
uble sh); | 76 [RaisesException] ImageData getImageData(double sx, double sy, double sw, do
uble sh); |
| 73 [RaisesException] void putImageData(ImageData imagedata, double dx, double d
y); | 77 [RaisesException] void putImageData(ImageData imagedata, double dx, double d
y); |
| 74 [RaisesException] void putImageData(ImageData imagedata, double dx, double d
y, double dirtyX, double dirtyY, double dirtyWidth, double dirtyHeight); | 78 [RaisesException] void putImageData(ImageData imagedata, double dx, double d
y, double dirtyX, double dirtyY, double dirtyWidth, double dirtyHeight); |
| 75 }; | 79 }; |
| 76 | 80 |
| 77 OffscreenCanvasRenderingContext2D implements CanvasPathMethods; | 81 OffscreenCanvasRenderingContext2D implements CanvasPathMethods; |
| OLD | NEW |