Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Side by Side Diff: third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.idl

Issue 1919363002: Add createGradient and createPattern to OffscreenCanvas2D in worker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ScriptState Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 offscr eenCanvas; 12 [ImplementedAs=getOffscreenCanvas] readonly attribute OffscreenCanvas offscr eenCanvas;
13 13
14 // colors and styles 14 // colors and styles
15 attribute (DOMString or CanvasGradient or CanvasPattern) strokeStyle; // (de fault black) 15 attribute (DOMString or CanvasGradient or CanvasPattern) strokeStyle; // (de fault black)
16 attribute (DOMString or CanvasGradient or CanvasPattern) fillStyle; // (defa ult black) 16 attribute (DOMString or CanvasGradient or CanvasPattern) fillStyle; // (defa ult black)
17 CanvasGradient createLinearGradient(double x0, double y0, double x1, double y1);
18 [RaisesException] CanvasGradient createRadialGradient(double x0, double y0, double r0, double x1, double y1, double r1);
19 [CallWith=ScriptState, RaisesException, Exposed=Worker] CanvasPattern? creat ePattern(CanvasImageSource image, [TreatNullAs=NullString] DOMString repetitionT ype);
17 20
18 // CanvasRect interface 21 // CanvasRect interface
19 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);
20 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);
21 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);
22 25
23 // Path API (See BaseRenderingContext2D) 26 // Path API (See BaseRenderingContext2D)
24 void beginPath(); 27 void beginPath();
25 void fill(optional CanvasFillRule winding); 28 void fill(optional CanvasFillRule winding);
26 void fill(Path2D path, optional CanvasFillRule winding); 29 void fill(Path2D path, optional CanvasFillRule winding);
(...skipping 24 matching lines...) Expand all
51 void resetTransform(); 54 void resetTransform();
52 55
53 // shadows 56 // shadows
54 attribute unrestricted double shadowOffsetX; 57 attribute unrestricted double shadowOffsetX;
55 attribute unrestricted double shadowOffsetY; 58 attribute unrestricted double shadowOffsetY;
56 attribute unrestricted double shadowBlur; 59 attribute unrestricted double shadowBlur;
57 attribute DOMString shadowColor; 60 attribute DOMString shadowColor;
58 }; 61 };
59 62
60 OffscreenCanvasRenderingContext2D implements CanvasPathMethods; 63 OffscreenCanvasRenderingContext2D implements CanvasPathMethods;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698