| 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 { |
| 11 // back-reference to the canvas | 11 // back-reference to the canvas |
| 12 [ImplementedAs=getOffscreenCanvas] readonly attribute OffscreenCanvas canvas
; | 12 [ImplementedAs=getOffscreenCanvas] readonly attribute OffscreenCanvas canvas
; |
| 13 | 13 |
| 14 [CallWith=ExecutionContext] void commit(); | 14 [RaisesException] void commit(); |
| 15 | 15 |
| 16 // colors and styles | 16 // colors and styles |
| 17 attribute (DOMString or CanvasGradient or CanvasPattern) strokeStyle; // (de
fault black) | 17 attribute (DOMString or CanvasGradient or CanvasPattern) strokeStyle; // (de
fault black) |
| 18 attribute (DOMString or CanvasGradient or CanvasPattern) fillStyle; // (defa
ult black) | 18 attribute (DOMString or CanvasGradient or CanvasPattern) fillStyle; // (defa
ult black) |
| 19 CanvasGradient createLinearGradient(double x0, double y0, double x1, double
y1); | 19 CanvasGradient createLinearGradient(double x0, double y0, double x1, double
y1); |
| 20 [RaisesException] CanvasGradient createRadialGradient(double x0, double y0,
double r0, double x1, double y1, double r1); | 20 [RaisesException] CanvasGradient createRadialGradient(double x0, double y0,
double r0, double x1, double y1, double r1); |
| 21 [CallWith=ExecutionContext, RaisesException] CanvasPattern? createPattern(Ca
nvasImageSource image, [TreatNullAs=NullString] DOMString repetitionType); | 21 [CallWith=ExecutionContext, RaisesException] CanvasPattern? createPattern(Ca
nvasImageSource image, [TreatNullAs=NullString] DOMString repetitionType); |
| 22 | 22 |
| 23 // CanvasRect interface | 23 // CanvasRect interface |
| 24 void clearRect(unrestricted double x, unrestricted double y, unrestricted do
uble width, unrestricted double height); | 24 void clearRect(unrestricted double x, unrestricted double y, unrestricted do
uble width, unrestricted double height); |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after 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 |