Chromium Code Reviews| 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 11 matching lines...) Expand all Loading... | |
| 22 void clearRect(unrestricted double x, unrestricted double y, unrestricted do uble width, unrestricted double height); | 22 void clearRect(unrestricted double x, unrestricted double y, unrestricted do uble width, unrestricted double height); |
| 23 void fillRect(unrestricted double x, unrestricted double y, unrestricted dou ble width, unrestricted double height); | 23 void fillRect(unrestricted double x, unrestricted double y, unrestricted dou ble width, unrestricted double height); |
| 24 void strokeRect(unrestricted double x, unrestricted double y, unrestricted d ouble width, unrestricted double height); | 24 void strokeRect(unrestricted double x, unrestricted double y, unrestricted d ouble width, unrestricted double height); |
| 25 | 25 |
| 26 // Path API (See BaseRenderingContext2D) | 26 // Path API (See BaseRenderingContext2D) |
| 27 void beginPath(); | 27 void beginPath(); |
| 28 void fill(optional CanvasFillRule winding); | 28 void fill(optional CanvasFillRule winding); |
| 29 void fill(Path2D path, optional CanvasFillRule winding); | 29 void fill(Path2D path, optional CanvasFillRule winding); |
| 30 void stroke(); | 30 void stroke(); |
| 31 void stroke(Path2D path); | 31 void stroke(Path2D path); |
| 32 void clip(); | |
| 33 void clip(Path2D path); | |
|
Stephen White
2016/05/20 17:41:26
Not sure I understand this change. Were these alre
| |
| 32 | 34 |
| 33 // drawing images | 35 // drawing images |
| 34 [CallWith=ExecutionContext, RaisesException] void drawImage(CanvasImageSourc e image, unrestricted double x, unrestricted double y); | 36 [CallWith=ExecutionContext, RaisesException] void drawImage(CanvasImageSourc e image, unrestricted double x, unrestricted double y); |
| 35 [CallWith=ExecutionContext, RaisesException] void drawImage(CanvasImageSourc e image, unrestricted double x, unrestricted double y, unrestricted double width , unrestricted double height); | 37 [CallWith=ExecutionContext, RaisesException] void drawImage(CanvasImageSourc e image, unrestricted double x, unrestricted double y, unrestricted double width , unrestricted double height); |
| 36 [CallWith=ExecutionContext, RaisesException] void drawImage(CanvasImageSourc e image, unrestricted double sx, unrestricted double sy, unrestricted double sw, unrestricted double sh, unrestricted double dx, unrestricted double dy, unrestr icted double dw, unrestricted double dh); | 38 [CallWith=ExecutionContext, RaisesException] void drawImage(CanvasImageSourc e image, unrestricted double sx, unrestricted double sy, unrestricted double sw, unrestricted double sh, unrestricted double dx, unrestricted double dy, unrestr icted double dw, unrestricted double dh); |
| 37 | 39 |
| 38 // Line caps/joins | 40 // Line caps/joins |
| 39 attribute unrestricted double lineWidth; // (default 1) | 41 attribute unrestricted double lineWidth; // (default 1) |
| 40 attribute DOMString lineCap; // "butt", "round", "square" (default "butt") | 42 attribute DOMString lineCap; // "butt", "round", "square" (default "butt") |
| 41 attribute DOMString lineJoin; // "round", "bevel", "miter" (default "miter") | 43 attribute DOMString lineJoin; // "round", "bevel", "miter" (default "miter") |
| (...skipping 24 matching lines...) Expand all Loading... | |
| 66 | 68 |
| 67 // pixel manipulation | 69 // pixel manipulation |
| 68 [RaisesException] ImageData createImageData(ImageData imagedata); | 70 [RaisesException] ImageData createImageData(ImageData imagedata); |
| 69 [RaisesException] ImageData createImageData(double sw, double sh); | 71 [RaisesException] ImageData createImageData(double sw, double sh); |
| 70 [RaisesException] ImageData getImageData(double sx, double sy, double sw, do uble sh); | 72 [RaisesException] ImageData getImageData(double sx, double sy, double sw, do uble sh); |
| 71 [RaisesException] void putImageData(ImageData imagedata, double dx, double d y); | 73 [RaisesException] void putImageData(ImageData imagedata, double dx, double d y); |
| 72 [RaisesException] void putImageData(ImageData imagedata, double dx, double d y, double dirtyX, double dirtyY, double dirtyWidth, double dirtyHeight); | 74 [RaisesException] void putImageData(ImageData imagedata, double dx, double d y, double dirtyX, double dirtyY, double dirtyWidth, double dirtyHeight); |
| 73 }; | 75 }; |
| 74 | 76 |
| 75 OffscreenCanvasRenderingContext2D implements CanvasPathMethods; | 77 OffscreenCanvasRenderingContext2D implements CanvasPathMethods; |
| OLD | NEW |