| 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 { |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 void strokeRect(unrestricted double x, unrestricted double y, unrestricted d
ouble width, unrestricted double height); | 53 void strokeRect(unrestricted double x, unrestricted double y, unrestricted d
ouble width, unrestricted double height); |
| 54 | 54 |
| 55 // Path API (See BaseRenderingContext2D) | 55 // Path API (See BaseRenderingContext2D) |
| 56 void beginPath(); | 56 void beginPath(); |
| 57 void fill(optional CanvasFillRule winding); | 57 void fill(optional CanvasFillRule winding); |
| 58 void fill(Path2D path, optional CanvasFillRule winding); | 58 void fill(Path2D path, optional CanvasFillRule winding); |
| 59 void stroke(); | 59 void stroke(); |
| 60 void stroke(Path2D path); | 60 void stroke(Path2D path); |
| 61 void clip(); | 61 void clip(); |
| 62 void clip(Path2D path); | 62 void clip(Path2D path); |
| 63 boolean isPointInPath(unrestricted double x, unrestricted double y, optional
CanvasFillRule winding); |
| 64 boolean isPointInPath(Path2D path, unrestricted double x, unrestricted doubl
e y, optional CanvasFillRule winding); |
| 65 boolean isPointInStroke(unrestricted double x, unrestricted double y); |
| 66 boolean isPointInStroke(Path2D path, unrestricted double x, unrestricted dou
ble y); |
| 63 | 67 |
| 64 // drawing images | 68 // drawing images |
| 65 [CallWith=ExecutionContext, RaisesException] void drawImage(CanvasImageSourc
e image, unrestricted double x, unrestricted double y); | 69 [CallWith=ExecutionContext, RaisesException] void drawImage(CanvasImageSourc
e image, unrestricted double x, unrestricted double y); |
| 66 [CallWith=ExecutionContext, RaisesException] void drawImage(CanvasImageSourc
e image, unrestricted double x, unrestricted double y, unrestricted double width
, unrestricted double height); | 70 [CallWith=ExecutionContext, RaisesException] void drawImage(CanvasImageSourc
e image, unrestricted double x, unrestricted double y, unrestricted double width
, unrestricted double height); |
| 67 [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); | 71 [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); |
| 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 // Line caps/joins | 80 // Line caps/joins |
| 77 attribute unrestricted double lineWidth; // (default 1) | 81 attribute unrestricted double lineWidth; // (default 1) |
| 78 attribute DOMString lineCap; // "butt", "round", "square" (default "butt") | 82 attribute DOMString lineCap; // "butt", "round", "square" (default "butt") |
| 79 attribute DOMString lineJoin; // "round", "bevel", "miter" (default "miter") | 83 attribute DOMString lineJoin; // "round", "bevel", "miter" (default "miter") |
| 80 attribute unrestricted double miterLimit; // (default 10) | 84 attribute unrestricted double miterLimit; // (default 10) |
| 81 | 85 |
| 82 // dashed lines | 86 // dashed lines |
| 83 void setLineDash(sequence<unrestricted double> dash); | 87 void setLineDash(sequence<unrestricted double> dash); |
| 84 sequence<unrestricted double> getLineDash(); | 88 sequence<unrestricted double> getLineDash(); |
| 85 attribute unrestricted double lineDashOffset; | 89 attribute unrestricted double lineDashOffset; |
| 86 }; | 90 }; |
| 87 | 91 |
| 88 OffscreenCanvasRenderingContext2D implements CanvasPathMethods; | 92 OffscreenCanvasRenderingContext2D implements CanvasPathMethods; |
| OLD | NEW |