OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
11 * documentation and/or other materials provided with the distribution. | 11 * documentation and/or other materials provided with the distribution. |
12 * | 12 * |
13 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY | 13 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY |
14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | 14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | 15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR | 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR |
17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | 17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | 18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | 19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | 20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY |
21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
24 */ | 24 */ |
25 | 25 |
26 enum CanvasWindingRule { "nonzero", "evenodd" }; | 26 // http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-elemen
t.html#canvasrenderingcontext2d |
| 27 |
| 28 // FIXME: float => double throughout |
| 29 // FIXME: Use union type in drawImage and createPattern once supported: |
| 30 // http://crbug.com/372891 |
| 31 typedef (HTMLImageElement or |
| 32 HTMLVideoElement or |
| 33 HTMLCanvasElement // or |
| 34 // CanvasRenderingContext2D or |
| 35 // ImageBitmap |
| 36 ) CanvasImageSource; |
| 37 |
| 38 enum CanvasFillRule { "nonzero", "evenodd" }; |
27 | 39 |
28 [ | 40 [ |
29 TypeChecking=Interface|Nullable|Unrestricted, | 41 TypeChecking=Interface|Nullable|Unrestricted, |
30 WillBeGarbageCollected, | 42 WillBeGarbageCollected, |
31 ] interface CanvasRenderingContext2D { | 43 ] interface CanvasRenderingContext2D { |
32 | 44 // back-reference to the canvas |
33 readonly attribute HTMLCanvasElement canvas; | 45 readonly attribute HTMLCanvasElement canvas; |
34 | 46 |
35 void save(); | 47 // state |
36 void restore(); | 48 void save(); // push state on state stack |
| 49 void restore(); // pop state stack and restore state |
37 | 50 |
| 51 // transformations (default transform is the identity matrix) |
38 [RuntimeEnabled=ExperimentalCanvasFeatures] attribute SVGMatrix currentTrans
form; | 52 [RuntimeEnabled=ExperimentalCanvasFeatures] attribute SVGMatrix currentTrans
form; |
39 void scale(unrestricted float sx, unrestricted float sy); | 53 void scale(unrestricted float x, unrestricted float y); |
40 void rotate(unrestricted float angle); | 54 void rotate(unrestricted float angle); |
41 void translate(unrestricted float tx, unrestricted float ty); | 55 void translate(unrestricted float x, unrestricted float y); |
42 void transform(unrestricted float m11, unrestricted float m12, unrestricted
float m21, unrestricted float m22, unrestricted float dx, unrestricted float dy)
; | 56 void transform(unrestricted float a, unrestricted float b, unrestricted floa
t c, unrestricted float d, unrestricted float e, unrestricted float f); |
43 void setTransform(unrestricted float m11, unrestricted float m12, unrestrict
ed float m21, unrestricted float m22, unrestricted float dx, unrestricted float
dy); | 57 void setTransform(unrestricted float a, unrestricted float b, unrestricted f
loat c, unrestricted float d, unrestricted float e, unrestricted float f); |
44 void resetTransform(); | 58 void resetTransform(); |
45 | 59 |
46 attribute unrestricted float globalAlpha; | 60 // compositing |
47 [TreatNullAs=NullString] attribute DOMString globalCompositeOperation; | 61 attribute unrestricted float globalAlpha; // (default 1.0) |
| 62 [TreatNullAs=NullString] attribute DOMString globalCompositeOperation; // (d
efault source-over) |
48 | 63 |
| 64 // image smoothing |
| 65 [ImplementedAs=imageSmoothingEnabled, MeasureAs=PrefixedImageSmoothingEnable
d] attribute boolean webkitImageSmoothingEnabled; |
| 66 [MeasureAs=UnprefixedImageSmoothingEnabled] attribute boolean imageSmoothing
Enabled; |
| 67 |
| 68 // colors and styles (see also the CanvasDrawingStyles interface) |
| 69 // FIXME: Use union types when supported: http://crbug.com/372891 |
| 70 [Custom] attribute object strokeStyle; // (default black) |
| 71 [Custom] attribute object fillStyle; // (default black) |
49 CanvasGradient createLinearGradient(float x0, float y0, float x1, float y1); | 72 CanvasGradient createLinearGradient(float x0, float y0, float x1, float y1); |
50 [RaisesException] CanvasGradient createRadialGradient(float x0, float y0, fl
oat r0, float x1, float y1, float r1); | 73 [RaisesException] CanvasGradient createRadialGradient(float x0, float y0, fl
oat r0, float x1, float y1, float r1); |
| 74 [RaisesException] CanvasPattern createPattern(HTMLCanvasElement canvas, [Tre
atNullAs=NullString] DOMString repetitionType); |
| 75 [RaisesException] CanvasPattern createPattern(HTMLImageElement image, [Treat
NullAs=NullString] DOMString repetitionType); |
| 76 [RaisesException] CanvasPattern createPattern(HTMLVideoElement image, [Treat
NullAs=NullString] DOMString repetitionType); |
51 | 77 |
52 attribute unrestricted float lineWidth; | 78 // shadows |
53 [TreatNullAs=NullString] attribute DOMString lineCap; | |
54 [TreatNullAs=NullString] attribute DOMString lineJoin; | |
55 attribute unrestricted float miterLimit; | |
56 | |
57 attribute unrestricted float shadowOffsetX; | 79 attribute unrestricted float shadowOffsetX; |
58 attribute unrestricted float shadowOffsetY; | 80 attribute unrestricted float shadowOffsetY; |
59 attribute unrestricted float shadowBlur; | 81 attribute unrestricted float shadowBlur; |
60 [TreatNullAs=NullString] attribute DOMString shadowColor; | 82 [TreatNullAs=NullString] attribute DOMString shadowColor; |
61 | 83 |
62 void setLineDash(sequence<unrestricted float> dash); | 84 // rects |
63 sequence<unrestricted float> getLineDash(); | |
64 attribute unrestricted float lineDashOffset; | |
65 | |
66 void clearRect(unrestricted float x, unrestricted float y, unrestricted floa
t width, unrestricted float height); | 85 void clearRect(unrestricted float x, unrestricted float y, unrestricted floa
t width, unrestricted float height); |
67 void fillRect(unrestricted float x, unrestricted float y, unrestricted float
width, unrestricted float height); | 86 void fillRect(unrestricted float x, unrestricted float y, unrestricted float
width, unrestricted float height); |
| 87 void strokeRect(unrestricted float x, unrestricted float y, unrestricted flo
at width, unrestricted float height); |
68 | 88 |
| 89 // path API (see also CanvasPathMethods) |
69 void beginPath(); | 90 void beginPath(); |
70 | 91 // FIXME: Simplify these using optional CanvasFillRule once crbug.com/339000
gets fixed. |
71 // FIXME: Simplify these using optional CanvasWindingRule once crbug.com/339
000 gets fixed. | |
72 void fill(); | 92 void fill(); |
| 93 void fill(CanvasFillRule winding); |
73 [RuntimeEnabled=Path2D] void fill(Path2D path); | 94 [RuntimeEnabled=Path2D] void fill(Path2D path); |
74 void fill(CanvasWindingRule winding); | 95 [RuntimeEnabled=Path2D] void fill(Path2D path, CanvasFillRule winding); |
75 [RuntimeEnabled=Path2D] void fill(Path2D path, CanvasWindingRule winding); | |
76 void stroke(); | 96 void stroke(); |
77 [RuntimeEnabled=Path2D] void stroke(Path2D path); | 97 [RuntimeEnabled=Path2D] void stroke(Path2D path); |
78 // FIXME: Simplify these using optional CanvasWindingRule once crbug.com/339
000 gets fixed. | 98 // Focus rings |
| 99 [RuntimeEnabled=ExperimentalCanvasFeatures] void drawFocusIfNeeded(Element e
lement); |
| 100 [RuntimeEnabled=ExperimentalCanvasFeatures] void drawFocusIfNeeded(Path2D pa
th, Element element); |
| 101 [RuntimeEnabled=ExperimentalCanvasFeatures] boolean drawCustomFocusRing(Elem
ent element); |
| 102 |
| 103 [RuntimeEnabled=ExperimentalCanvasFeatures] void scrollPathIntoView(); |
| 104 [RuntimeEnabled=ExperimentalCanvasFeatures] void scrollPathIntoView(Path2D p
ath); |
| 105 // FIXME: Simplify these using optional CanvasFillRule once crbug.com/339000
gets fixed. |
79 void clip(); | 106 void clip(); |
| 107 void clip(CanvasFillRule winding); |
80 [RuntimeEnabled=Path2D] void clip(Path2D path); | 108 [RuntimeEnabled=Path2D] void clip(Path2D path); |
81 void clip(CanvasWindingRule winding); | 109 [RuntimeEnabled=Path2D] void clip(Path2D path, CanvasFillRule winding); |
82 [RuntimeEnabled=Path2D] void clip(Path2D path, CanvasWindingRule winding); | 110 // FIXME: Simplify these using optional CanvasFillRule once crbug.com/339000
gets fixed. |
83 | |
84 // FIXME: Simplify these using optional CanvasWindingRule once crbug.com/339
000 gets fixed. | |
85 boolean isPointInPath(unrestricted float x, unrestricted float y); | 111 boolean isPointInPath(unrestricted float x, unrestricted float y); |
| 112 boolean isPointInPath(unrestricted float x, unrestricted float y, CanvasFill
Rule winding); |
86 [RuntimeEnabled=Path2D] boolean isPointInPath(Path2D path, unrestricted floa
t x, unrestricted float y); | 113 [RuntimeEnabled=Path2D] boolean isPointInPath(Path2D path, unrestricted floa
t x, unrestricted float y); |
87 boolean isPointInPath(unrestricted float x, unrestricted float y, CanvasWind
ingRule winding); | 114 [RuntimeEnabled=Path2D] boolean isPointInPath(Path2D path, unrestricted floa
t x, unrestricted float y, CanvasFillRule winding); |
88 [RuntimeEnabled=Path2D] boolean isPointInPath(Path2D path, unrestricted floa
t x, unrestricted float y, CanvasWindingRule winding); | |
89 boolean isPointInStroke(unrestricted float x, unrestricted float y); | 115 boolean isPointInStroke(unrestricted float x, unrestricted float y); |
90 [RuntimeEnabled=Path2D] boolean isPointInStroke(Path2D path, unrestricted fl
oat x, unrestricted float y); | 116 [RuntimeEnabled=Path2D] boolean isPointInStroke(Path2D path, unrestricted fl
oat x, unrestricted float y); |
91 | 117 |
92 [RuntimeEnabled=ExperimentalCanvasFeatures] void scrollPathIntoView(); | 118 // text (see also the CanvasDrawingStyles interface) |
93 [RuntimeEnabled=ExperimentalCanvasFeatures] void scrollPathIntoView(Path2D p
ath); | |
94 | |
95 // text | |
96 attribute DOMString font; | |
97 attribute DOMString textAlign; | |
98 attribute DOMString textBaseline; | |
99 void fillText(DOMString text, unrestricted float x, unrestricted float y, op
tional unrestricted float maxWidth); | 119 void fillText(DOMString text, unrestricted float x, unrestricted float y, op
tional unrestricted float maxWidth); |
100 void strokeText(DOMString text, unrestricted float x, unrestricted float y,
optional unrestricted float maxWidth); | 120 void strokeText(DOMString text, unrestricted float x, unrestricted float y,
optional unrestricted float maxWidth); |
101 | |
102 TextMetrics measureText(DOMString text); | 121 TextMetrics measureText(DOMString text); |
103 | 122 |
104 // Context state | 123 // drawing images |
105 // Should be merged with WebGL counterpart in CanvasRenderingContext, once n
o-longer experimental | |
106 [RuntimeEnabled=ExperimentalCanvasFeatures] boolean isContextLost(); | |
107 | |
108 void strokeRect(unrestricted float x, unrestricted float y, unrestricted flo
at width, unrestricted float height); | |
109 | |
110 [RaisesException] void drawImage(HTMLImageElement image, unrestricted float
x, unrestricted float y); | 124 [RaisesException] void drawImage(HTMLImageElement image, unrestricted float
x, unrestricted float y); |
111 [RaisesException] void drawImage(HTMLImageElement image, unrestricted float
x, unrestricted float y, unrestricted float width, unrestricted float height); | 125 [RaisesException] void drawImage(HTMLImageElement image, unrestricted float
x, unrestricted float y, unrestricted float width, unrestricted float height); |
112 [RaisesException] void drawImage(HTMLImageElement image, unrestricted float
sx, unrestricted float sy, unrestricted float sw, unrestricted float sh, unrestr
icted float dx, unrestricted float dy, unrestricted float dw, unrestricted float
dh); | 126 [RaisesException] void drawImage(HTMLImageElement image, unrestricted float
sx, unrestricted float sy, unrestricted float sw, unrestricted float sh, unrestr
icted float dx, unrestricted float dy, unrestricted float dw, unrestricted float
dh); |
113 [RaisesException] void drawImage(HTMLCanvasElement canvas, unrestricted floa
t x, unrestricted float y); | 127 [RaisesException] void drawImage(HTMLCanvasElement canvas, unrestricted floa
t x, unrestricted float y); |
114 [RaisesException] void drawImage(HTMLCanvasElement canvas, unrestricted floa
t x, unrestricted float y, unrestricted float width, unrestricted float height); | 128 [RaisesException] void drawImage(HTMLCanvasElement canvas, unrestricted floa
t x, unrestricted float y, unrestricted float width, unrestricted float height); |
115 [RaisesException] void drawImage(HTMLCanvasElement canvas, unrestricted floa
t sx, unrestricted float sy, unrestricted float sw, unrestricted float sh, unres
tricted float dx, unrestricted float dy, unrestricted float dw, unrestricted flo
at dh); | 129 [RaisesException] void drawImage(HTMLCanvasElement canvas, unrestricted floa
t sx, unrestricted float sy, unrestricted float sw, unrestricted float sh, unres
tricted float dx, unrestricted float dy, unrestricted float dw, unrestricted flo
at dh); |
116 [RaisesException] void drawImage(HTMLVideoElement video, unrestricted float
x, unrestricted float y); | 130 [RaisesException] void drawImage(HTMLVideoElement video, unrestricted float
x, unrestricted float y); |
117 [RaisesException] void drawImage(HTMLVideoElement video, unrestricted float
x, unrestricted float y, unrestricted float width, unrestricted float height); | 131 [RaisesException] void drawImage(HTMLVideoElement video, unrestricted float
x, unrestricted float y, unrestricted float width, unrestricted float height); |
118 [RaisesException] void drawImage(HTMLVideoElement video, unrestricted float
sx, unrestricted float sy, unrestricted float sw, unrestricted float sh, unrestr
icted float dx, unrestricted float dy, unrestricted float dw, unrestricted float
dh); | 132 [RaisesException] void drawImage(HTMLVideoElement video, unrestricted float
sx, unrestricted float sy, unrestricted float sw, unrestricted float sh, unrestr
icted float dx, unrestricted float dy, unrestricted float dw, unrestricted float
dh); |
119 [RuntimeEnabled=ExperimentalCanvasFeatures, RaisesException] void drawImage(
ImageBitmap imageBitmap, unrestricted float x, unrestricted float y); | 133 [RuntimeEnabled=ExperimentalCanvasFeatures, RaisesException] void drawImage(
ImageBitmap imageBitmap, unrestricted float x, unrestricted float y); |
120 [RuntimeEnabled=ExperimentalCanvasFeatures, RaisesException] void drawImage(
ImageBitmap imageBitmap, unrestricted float x, unrestricted float y, unrestricte
d float width, unrestricted float height); | 134 [RuntimeEnabled=ExperimentalCanvasFeatures, RaisesException] void drawImage(
ImageBitmap imageBitmap, unrestricted float x, unrestricted float y, unrestricte
d float width, unrestricted float height); |
121 [RuntimeEnabled=ExperimentalCanvasFeatures, RaisesException] void drawImage(
ImageBitmap imageBitmap, unrestricted float sx, unrestricted float sy, unrestric
ted float sw, unrestricted float sh, unrestricted float dx, unrestricted float d
y, unrestricted float dw, unrestricted float dh); | 135 [RuntimeEnabled=ExperimentalCanvasFeatures, RaisesException] void drawImage(
ImageBitmap imageBitmap, unrestricted float sx, unrestricted float sy, unrestric
ted float sw, unrestricted float sh, unrestricted float dx, unrestricted float d
y, unrestricted float dw, unrestricted float dh); |
122 | 136 |
| 137 // pixel manipulation |
| 138 ImageData createImageData(ImageData imagedata); |
| 139 [RaisesException] ImageData createImageData(float sw, float sh); |
| 140 [RaisesException] ImageData getImageData(float sx, float sy, float sw, float
sh); |
123 void putImageData(ImageData imagedata, float dx, float dy); | 141 void putImageData(ImageData imagedata, float dx, float dy); |
124 void putImageData(ImageData imagedata, float dx, float dy, float dirtyX, flo
at dirtyY, float dirtyWidth, float dirtyHeight); | 142 void putImageData(ImageData imagedata, float dx, float dy, float dirtyX, flo
at dirtyY, float dirtyWidth, float dirtyHeight); |
125 | 143 |
126 [RaisesException] CanvasPattern createPattern(HTMLCanvasElement canvas, [Tre
atNullAs=NullString] DOMString repetitionType); | 144 // Context state |
127 [RaisesException] CanvasPattern createPattern(HTMLImageElement image, [Treat
NullAs=NullString] DOMString repetitionType); | 145 // Should be merged with WebGL counterpart in CanvasRenderingContext, once n
o-longer experimental |
128 [RaisesException] CanvasPattern createPattern(HTMLVideoElement image, [Treat
NullAs=NullString] DOMString repetitionType); | 146 [RuntimeEnabled=ExperimentalCanvasFeatures] boolean isContextLost(); |
129 ImageData createImageData(ImageData imagedata); | |
130 [RaisesException] ImageData createImageData(float sw, float sh); | |
131 | |
132 [Custom] attribute object strokeStyle; | |
133 [Custom] attribute object fillStyle; | |
134 | |
135 // pixel manipulation | |
136 [RaisesException] ImageData getImageData(float sx, float sy, float sw, float
sh); | |
137 | |
138 // Focus rings | |
139 [RuntimeEnabled=ExperimentalCanvasFeatures] void drawFocusIfNeeded(Element e
lement); | |
140 [RuntimeEnabled=ExperimentalCanvasFeatures] void drawFocusIfNeeded(Path2D pa
th, Element element); | |
141 [RuntimeEnabled=ExperimentalCanvasFeatures] boolean drawCustomFocusRing(Elem
ent element); | |
142 | |
143 [ImplementedAs=imageSmoothingEnabled, MeasureAs=PrefixedImageSmoothingEnable
d] attribute boolean webkitImageSmoothingEnabled; | |
144 [MeasureAs=UnprefixedImageSmoothingEnabled] attribute boolean imageSmoothing
Enabled; | |
145 | 147 |
146 Canvas2DContextAttributes getContextAttributes(); | 148 Canvas2DContextAttributes getContextAttributes(); |
147 | 149 |
| 150 // FIXME: factor out to CanvasDrawingStyles |
| 151 // line caps/joins |
| 152 attribute unrestricted float lineWidth; // (default 1) |
| 153 [TreatNullAs=NullString] attribute DOMString lineCap; // "butt", "round", "s
quare" (default "butt") |
| 154 [TreatNullAs=NullString] attribute DOMString lineJoin; // "round", "bevel",
"miter" (default "miter") |
| 155 attribute unrestricted float miterLimit; // (default 10) |
| 156 |
| 157 // dashed lines |
| 158 void setLineDash(sequence<unrestricted float> dash); |
| 159 sequence<unrestricted float> getLineDash(); |
| 160 attribute unrestricted float lineDashOffset; |
| 161 |
| 162 // text |
| 163 attribute DOMString font; // (default 10px sans-serif) |
| 164 attribute DOMString textAlign; // "start", "end", "left", "right", "center"
(default: "start") |
| 165 attribute DOMString textBaseline; // "top", "hanging", "middle", "alphabetic
", "ideographic", "bottom" (default: "alphabetic") |
| 166 |
148 // Non-standard APIs. Candidates for deprecation | 167 // Non-standard APIs. Candidates for deprecation |
| 168 // https://developer.mozilla.org/en/docs/Web/API/CanvasRenderingContext2D |
149 [MeasureAs=CanvasRenderingContext2DSetAlpha] void setAlpha(unrestricted floa
t alpha); | 169 [MeasureAs=CanvasRenderingContext2DSetAlpha] void setAlpha(unrestricted floa
t alpha); |
150 [MeasureAs=CanvasRenderingContext2DSetCompositeOperation] void setCompositeO
peration(DOMString compositeOperation); | 170 [MeasureAs=CanvasRenderingContext2DSetCompositeOperation] void setCompositeO
peration(DOMString compositeOperation); |
151 [MeasureAs=CanvasRenderingContext2DSetLineWidth] void setLineWidth(unrestric
ted float width); | 171 [MeasureAs=CanvasRenderingContext2DSetLineWidth] void setLineWidth(unrestric
ted float width); |
152 [MeasureAs=CanvasRenderingContext2DSetLineCap] void setLineCap(DOMString cap
); | 172 [MeasureAs=CanvasRenderingContext2DSetLineCap] void setLineCap(DOMString cap
); |
153 [MeasureAs=CanvasRenderingContext2DSetLineJoin] void setLineJoin(DOMString j
oin); | 173 [MeasureAs=CanvasRenderingContext2DSetLineJoin] void setLineJoin(DOMString j
oin); |
154 [MeasureAs=CanvasRenderingContext2DSetMiterLimit] void setMiterLimit(unrestr
icted float limit); | 174 [MeasureAs=CanvasRenderingContext2DSetMiterLimit] void setMiterLimit(unrestr
icted float limit); |
155 [MeasureAs=CanvasRenderingContext2DClearShadow] void clearShadow(); | 175 [MeasureAs=CanvasRenderingContext2DClearShadow] void clearShadow(); |
156 [MeasureAs=CanvasRenderingContext2DSetStrokeColor] void setStrokeColor([Lega
cyOverloadString] DOMString color, optional unrestricted float alpha); | 176 [MeasureAs=CanvasRenderingContext2DSetStrokeColor] void setStrokeColor(DOMSt
ring color, optional unrestricted float alpha); |
157 [MeasureAs=CanvasRenderingContext2DSetStrokeColor] void setStrokeColor(unres
tricted float grayLevel, optional unrestricted float alpha); | 177 [MeasureAs=CanvasRenderingContext2DSetStrokeColor] void setStrokeColor(unres
tricted float grayLevel, optional unrestricted float alpha); |
158 [MeasureAs=CanvasRenderingContext2DSetStrokeColor] void setStrokeColor(unres
tricted float r, unrestricted float g, unrestricted float b, unrestricted float
a); | 178 [MeasureAs=CanvasRenderingContext2DSetStrokeColor] void setStrokeColor(unres
tricted float r, unrestricted float g, unrestricted float b, unrestricted float
a); |
159 [MeasureAs=CanvasRenderingContext2DSetStrokeColor] void setStrokeColor(unres
tricted float c, unrestricted float m, unrestricted float y, unrestricted float
k, unrestricted float a); | 179 [MeasureAs=CanvasRenderingContext2DSetStrokeColor] void setStrokeColor(unres
tricted float c, unrestricted float m, unrestricted float y, unrestricted float
k, unrestricted float a); |
160 [MeasureAs=CanvasRenderingContext2DSetFillColor] void setFillColor([LegacyOv
erloadString] DOMString color, optional unrestricted float alpha); | 180 [MeasureAs=CanvasRenderingContext2DSetFillColor] void setFillColor(DOMString
color, optional unrestricted float alpha); |
161 [MeasureAs=CanvasRenderingContext2DSetFillColor] void setFillColor(unrestric
ted float grayLevel, optional unrestricted float alpha); | 181 [MeasureAs=CanvasRenderingContext2DSetFillColor] void setFillColor(unrestric
ted float grayLevel, optional unrestricted float alpha); |
162 [MeasureAs=CanvasRenderingContext2DSetFillColor] void setFillColor(unrestric
ted float r, unrestricted float g, unrestricted float b, unrestricted float a); | 182 [MeasureAs=CanvasRenderingContext2DSetFillColor] void setFillColor(unrestric
ted float r, unrestricted float g, unrestricted float b, unrestricted float a); |
163 [MeasureAs=CanvasRenderingContext2DSetFillColor] void setFillColor(unrestric
ted float c, unrestricted float m, unrestricted float y, unrestricted float k, u
nrestricted float a); | 183 [MeasureAs=CanvasRenderingContext2DSetFillColor] void setFillColor(unrestric
ted float c, unrestricted float m, unrestricted float y, unrestricted float k, u
nrestricted float a); |
164 [MeasureAs=CanvasRenderingContext2DDrawImageFromRect] void drawImageFromRect
( | 184 [MeasureAs=CanvasRenderingContext2DDrawImageFromRect] void drawImageFromRect
( |
165 HTMLImageElement? image, optional unrestricted float sx, optional unrest
ricted float sy, optional unrestricted float sw, optional unrestricted float sh, | 185 HTMLImageElement? image, optional unrestricted float sx, optional unrest
ricted float sy, optional unrestricted float sw, optional unrestricted float sh, |
166 optional unrestricted float dx, optional unrestricted float dy, optional
unrestricted float dw, optional unrestricted float dh, optional DOMString compo
siteOperation); | 186 optional unrestricted float dx, optional unrestricted float dy, optional
unrestricted float dw, optional unrestricted float dh, optional DOMString compo
siteOperation); |
167 [MeasureAs=CanvasRenderingContext2DSetShadow] void setShadow(unrestricted fl
oat width, unrestricted float height, unrestricted float blur, [LegacyOverloadSt
ring] optional DOMString color, optional unrestricted float alpha); | 187 [MeasureAs=CanvasRenderingContext2DSetShadow] void setShadow(unrestricted fl
oat width, unrestricted float height, unrestricted float blur, [LegacyOverloadSt
ring] optional DOMString color, optional unrestricted float alpha); |
168 [MeasureAs=CanvasRenderingContext2DSetShadow] void setShadow(unrestricted fl
oat width, unrestricted float height, unrestricted float blur, unrestricted floa
t grayLevel, optional unrestricted float alpha); | 188 [MeasureAs=CanvasRenderingContext2DSetShadow] void setShadow(unrestricted fl
oat width, unrestricted float height, unrestricted float blur, unrestricted floa
t grayLevel, optional unrestricted float alpha); |
169 [MeasureAs=CanvasRenderingContext2DSetShadow] void setShadow(unrestricted fl
oat width, unrestricted float height, unrestricted float blur, unrestricted floa
t r, unrestricted float g, unrestricted float b, unrestricted float a); | 189 [MeasureAs=CanvasRenderingContext2DSetShadow] void setShadow(unrestricted fl
oat width, unrestricted float height, unrestricted float blur, unrestricted floa
t r, unrestricted float g, unrestricted float b, unrestricted float a); |
170 [MeasureAs=CanvasRenderingContext2DSetShadow] void setShadow(unrestricted fl
oat width, unrestricted float height, unrestricted float blur, unrestricted floa
t c, unrestricted float m, unrestricted float y, unrestricted float k, unrestric
ted float a); | 190 [MeasureAs=CanvasRenderingContext2DSetShadow] void setShadow(unrestricted fl
oat width, unrestricted float height, unrestricted float blur, unrestricted floa
t c, unrestricted float m, unrestricted float y, unrestricted float k, unrestric
ted float a); |
171 }; | 191 }; |
172 | 192 |
173 CanvasRenderingContext2D implements CanvasPathMethods; | 193 CanvasRenderingContext2D implements CanvasPathMethods; |
OLD | NEW |