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://drafts.css-houdini.org/css-paint-api/#paintrenderingcontext2d | 5 // https://drafts.css-houdini.org/css-paint-api/#paintrenderingcontext2d |
6 | 6 |
7 [ | 7 [ |
8 Exposed=PaintWorklet, | 8 Exposed=PaintWorklet, |
9 RuntimeEnabled=CSSPaintAPI, | 9 RuntimeEnabled=CSSPaintAPI, |
10 ] interface PaintRenderingContext2D { | 10 ] interface PaintRenderingContext2D { |
(...skipping 16 matching lines...) Expand all Loading... |
27 | 27 |
28 // image smoothing | 28 // image smoothing |
29 attribute boolean imageSmoothingEnabled; // (default True) | 29 attribute boolean imageSmoothingEnabled; // (default True) |
30 [RuntimeEnabled=ExperimentalCanvasFeatures] attribute ImageSmoothingQuality
imageSmoothingQuality; // (default "low") | 30 [RuntimeEnabled=ExperimentalCanvasFeatures] attribute ImageSmoothingQuality
imageSmoothingQuality; // (default "low") |
31 | 31 |
32 // colors and styles (see also the CanvasDrawingStyles interface) | 32 // colors and styles (see also the CanvasDrawingStyles interface) |
33 attribute (DOMString or CanvasGradient or CanvasPattern) strokeStyle; // (de
fault black) | 33 attribute (DOMString or CanvasGradient or CanvasPattern) strokeStyle; // (de
fault black) |
34 attribute (DOMString or CanvasGradient or CanvasPattern) fillStyle; // (defa
ult black) | 34 attribute (DOMString or CanvasGradient or CanvasPattern) fillStyle; // (defa
ult black) |
35 CanvasGradient createLinearGradient(double x0, double y0, double x1, double
y1); | 35 CanvasGradient createLinearGradient(double x0, double y0, double x1, double
y1); |
36 [RaisesException] CanvasGradient createRadialGradient(double x0, double y0,
double r0, double x1, double y1, double r1); | 36 [RaisesException] CanvasGradient createRadialGradient(double x0, double y0,
double r0, double x1, double y1, double r1); |
37 [CallWith=ScriptState, RaisesException] CanvasPattern? createPattern(CanvasI
mageSource image, [TreatNullAs=NullString] DOMString repetitionType); | 37 [RaisesException] CanvasPattern? createPattern(CanvasImageSource image, [Tre
atNullAs=NullString] DOMString repetitionType); |
38 | 38 |
39 // shadows | 39 // shadows |
40 attribute unrestricted double shadowOffsetX; | 40 attribute unrestricted double shadowOffsetX; |
41 attribute unrestricted double shadowOffsetY; | 41 attribute unrestricted double shadowOffsetY; |
42 attribute unrestricted double shadowBlur; | 42 attribute unrestricted double shadowBlur; |
43 attribute DOMString shadowColor; | 43 attribute DOMString shadowColor; |
44 | 44 |
45 // rects | 45 // rects |
46 void clearRect(unrestricted double x, unrestricted double y, unrestricted do
uble width, unrestricted double height); | 46 void clearRect(unrestricted double x, unrestricted double y, unrestricted do
uble width, unrestricted double height); |
47 void fillRect(unrestricted double x, unrestricted double y, unrestricted dou
ble width, unrestricted double height); | 47 void fillRect(unrestricted double x, unrestricted double y, unrestricted dou
ble width, unrestricted double height); |
(...skipping 24 matching lines...) Expand all Loading... |
72 attribute DOMString lineCap; // "butt", "round", "square" (default "butt") | 72 attribute DOMString lineCap; // "butt", "round", "square" (default "butt") |
73 attribute DOMString lineJoin; // "round", "bevel", "miter" (default "miter") | 73 attribute DOMString lineJoin; // "round", "bevel", "miter" (default "miter") |
74 attribute unrestricted double miterLimit; // (default 10) | 74 attribute unrestricted double miterLimit; // (default 10) |
75 | 75 |
76 // dashed lines | 76 // dashed lines |
77 void setLineDash(sequence<unrestricted double> dash); | 77 void setLineDash(sequence<unrestricted double> dash); |
78 sequence<unrestricted double> getLineDash(); | 78 sequence<unrestricted double> getLineDash(); |
79 attribute unrestricted double lineDashOffset; | 79 attribute unrestricted double lineDashOffset; |
80 }; | 80 }; |
81 PaintRenderingContext2D implements CanvasPathMethods; | 81 PaintRenderingContext2D implements CanvasPathMethods; |
OLD | NEW |