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 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 attribute unrestricted float shadowBlur; | 81 attribute unrestricted float shadowBlur; |
82 [TreatNullAs=NullString] attribute DOMString shadowColor; | 82 [TreatNullAs=NullString] attribute DOMString shadowColor; |
83 | 83 |
84 // rects | 84 // rects |
85 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); |
86 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); | 87 void strokeRect(unrestricted float x, unrestricted float y, unrestricted flo
at width, unrestricted float height); |
88 | 88 |
89 // path API (see also CanvasPathMethods) | 89 // path API (see also CanvasPathMethods) |
90 void beginPath(); | 90 void beginPath(); |
91 void fill(optional CanvasFillRule winding); | 91 void fill(optional CanvasFillRule fillRule = "nonzero"); |
92 [RuntimeEnabled=Path2D] void fill(Path2D path, optional CanvasFillRule windi
ng); | 92 [RuntimeEnabled=Path2D] void fill(Path2D path, optional CanvasFillRule fillR
ule = "nonzero"); |
93 void stroke(); | 93 void stroke(); |
94 [RuntimeEnabled=Path2D] void stroke(Path2D path); | 94 [RuntimeEnabled=Path2D] void stroke(Path2D path); |
95 // Focus rings | 95 // Focus rings |
96 void drawFocusIfNeeded(Element element); | 96 void drawFocusIfNeeded(Element element); |
97 [RuntimeEnabled=Path2D] void drawFocusIfNeeded(Path2D path, Element element)
; | 97 [RuntimeEnabled=Path2D] void drawFocusIfNeeded(Path2D path, Element element)
; |
98 | 98 |
99 [RuntimeEnabled=ExperimentalCanvasFeatures] void scrollPathIntoView(optional
Path2D path); | 99 [RuntimeEnabled=ExperimentalCanvasFeatures] void scrollPathIntoView(optional
Path2D path); |
100 void clip(optional CanvasFillRule winding); | 100 void clip(optional CanvasFillRule fillRule = "nonzero"); |
101 [RuntimeEnabled=Path2D] void clip(Path2D path, optional CanvasFillRule windi
ng); | 101 [RuntimeEnabled=Path2D] void clip(Path2D path, optional CanvasFillRule fillR
ule = "nonzero"); |
102 boolean isPointInPath(unrestricted float x, unrestricted float y, optional C
anvasFillRule winding); | 102 boolean isPointInPath(unrestricted float x, unrestricted float y, optional C
anvasFillRule fillRule = "nonzero"); |
103 [RuntimeEnabled=Path2D] boolean isPointInPath(Path2D path, unrestricted floa
t x, unrestricted float y, optional CanvasFillRule winding); | 103 [RuntimeEnabled=Path2D] boolean isPointInPath(Path2D path, unrestricted floa
t x, unrestricted float y, optional CanvasFillRule fillRule = "nonzero"); |
104 boolean isPointInStroke(unrestricted float x, unrestricted float y); | 104 boolean isPointInStroke(unrestricted float x, unrestricted float y); |
105 [RuntimeEnabled=Path2D] boolean isPointInStroke(Path2D path, unrestricted fl
oat x, unrestricted float y); | 105 [RuntimeEnabled=Path2D] boolean isPointInStroke(Path2D path, unrestricted fl
oat x, unrestricted float y); |
106 | 106 |
107 // text (see also the CanvasDrawingStyles interface) | 107 // text (see also the CanvasDrawingStyles interface) |
108 void fillText(DOMString text, unrestricted float x, unrestricted float y, op
tional unrestricted float maxWidth); | 108 void fillText(DOMString text, unrestricted float x, unrestricted float y, op
tional unrestricted float maxWidth); |
109 void strokeText(DOMString text, unrestricted float x, unrestricted float y,
optional unrestricted float maxWidth); | 109 void strokeText(DOMString text, unrestricted float x, unrestricted float y,
optional unrestricted float maxWidth); |
110 TextMetrics measureText(DOMString text); | 110 TextMetrics measureText(DOMString text); |
111 | 111 |
112 // drawing images | 112 // drawing images |
113 [RaisesException] void drawImage(HTMLImageElement image, unrestricted float
x, unrestricted float y); | 113 [RaisesException] void drawImage(HTMLImageElement image, unrestricted float
x, unrestricted float y); |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 // Non-standard APIs. Candidates for deprecation | 163 // Non-standard APIs. Candidates for deprecation |
164 // https://developer.mozilla.org/en/docs/Web/API/CanvasRenderingContext2D | 164 // https://developer.mozilla.org/en/docs/Web/API/CanvasRenderingContext2D |
165 [MeasureAs=CanvasRenderingContext2DSetAlpha] void setAlpha(unrestricted floa
t alpha); | 165 [MeasureAs=CanvasRenderingContext2DSetAlpha] void setAlpha(unrestricted floa
t alpha); |
166 [MeasureAs=CanvasRenderingContext2DSetCompositeOperation] void setCompositeO
peration(DOMString compositeOperation); | 166 [MeasureAs=CanvasRenderingContext2DSetCompositeOperation] void setCompositeO
peration(DOMString compositeOperation); |
167 [MeasureAs=CanvasRenderingContext2DSetLineWidth] void setLineWidth(unrestric
ted float width); | 167 [MeasureAs=CanvasRenderingContext2DSetLineWidth] void setLineWidth(unrestric
ted float width); |
168 [MeasureAs=CanvasRenderingContext2DSetLineCap] void setLineCap(DOMString cap
); | 168 [MeasureAs=CanvasRenderingContext2DSetLineCap] void setLineCap(DOMString cap
); |
169 [MeasureAs=CanvasRenderingContext2DSetLineJoin] void setLineJoin(DOMString j
oin); | 169 [MeasureAs=CanvasRenderingContext2DSetLineJoin] void setLineJoin(DOMString j
oin); |
170 [MeasureAs=CanvasRenderingContext2DSetMiterLimit] void setMiterLimit(unrestr
icted float limit); | 170 [MeasureAs=CanvasRenderingContext2DSetMiterLimit] void setMiterLimit(unrestr
icted float limit); |
171 [MeasureAs=CanvasRenderingContext2DClearShadow] void clearShadow(); | 171 [MeasureAs=CanvasRenderingContext2DClearShadow] void clearShadow(); |
172 [MeasureAs=CanvasRenderingContext2DSetStrokeColor] void setStrokeColor(DOMSt
ring color, optional unrestricted float alpha); | 172 [MeasureAs=CanvasRenderingContext2DSetStrokeColor] void setStrokeColor(DOMSt
ring color, optional unrestricted float alpha); |
173 [MeasureAs=CanvasRenderingContext2DSetStrokeColor] void setStrokeColor(unres
tricted float grayLevel, optional unrestricted float alpha); | 173 [MeasureAs=CanvasRenderingContext2DSetStrokeColor] void setStrokeColor(unres
tricted float grayLevel, optional unrestricted float alpha = 1.0); |
174 [MeasureAs=CanvasRenderingContext2DSetStrokeColor] void setStrokeColor(unres
tricted float r, unrestricted float g, unrestricted float b, unrestricted float
a); | 174 [MeasureAs=CanvasRenderingContext2DSetStrokeColor] void setStrokeColor(unres
tricted float r, unrestricted float g, unrestricted float b, unrestricted float
a); |
175 [MeasureAs=CanvasRenderingContext2DSetStrokeColor] void setStrokeColor(unres
tricted float c, unrestricted float m, unrestricted float y, unrestricted float
k, unrestricted float a); | 175 [MeasureAs=CanvasRenderingContext2DSetStrokeColor] void setStrokeColor(unres
tricted float c, unrestricted float m, unrestricted float y, unrestricted float
k, unrestricted float a); |
176 [MeasureAs=CanvasRenderingContext2DSetFillColor] void setFillColor(DOMString
color, optional unrestricted float alpha); | 176 [MeasureAs=CanvasRenderingContext2DSetFillColor] void setFillColor(DOMString
color, optional unrestricted float alpha); |
177 [MeasureAs=CanvasRenderingContext2DSetFillColor] void setFillColor(unrestric
ted float grayLevel, optional unrestricted float alpha); | 177 [MeasureAs=CanvasRenderingContext2DSetFillColor] void setFillColor(unrestric
ted float grayLevel, optional unrestricted float alpha = 1.0); |
178 [MeasureAs=CanvasRenderingContext2DSetFillColor] void setFillColor(unrestric
ted float r, unrestricted float g, unrestricted float b, unrestricted float a); | 178 [MeasureAs=CanvasRenderingContext2DSetFillColor] void setFillColor(unrestric
ted float r, unrestricted float g, unrestricted float b, unrestricted float a); |
179 [MeasureAs=CanvasRenderingContext2DSetFillColor] void setFillColor(unrestric
ted float c, unrestricted float m, unrestricted float y, unrestricted float k, u
nrestricted float a); | 179 [MeasureAs=CanvasRenderingContext2DSetFillColor] void setFillColor(unrestric
ted float c, unrestricted float m, unrestricted float y, unrestricted float k, u
nrestricted float a); |
180 [MeasureAs=CanvasRenderingContext2DDrawImageFromRect] void drawImageFromRect
( | 180 [MeasureAs=CanvasRenderingContext2DDrawImageFromRect] void drawImageFromRect
( |
181 HTMLImageElement? image, optional unrestricted float sx, optional unrest
ricted float sy, optional unrestricted float sw, optional unrestricted float sh, | 181 HTMLImageElement? image, optional unrestricted float sx, optional unrest
ricted float sy, optional unrestricted float sw, optional unrestricted float sh, |
182 optional unrestricted float dx, optional unrestricted float dy, optional
unrestricted float dw, optional unrestricted float dh, optional DOMString compo
siteOperation); | 182 optional unrestricted float dx, optional unrestricted float dy, optional
unrestricted float dw, optional unrestricted float dh, optional DOMString compo
siteOperation); |
183 [MeasureAs=CanvasRenderingContext2DSetShadow] void setShadow(unrestricted fl
oat width, unrestricted float height, unrestricted float blur, optional DOMStrin
g color, optional unrestricted float alpha); | 183 [MeasureAs=CanvasRenderingContext2DSetShadow] void setShadow(unrestricted fl
oat width, unrestricted float height, unrestricted float blur, optional DOMStrin
g color, optional unrestricted float alpha); |
184 [MeasureAs=CanvasRenderingContext2DSetShadow] void setShadow(unrestricted fl
oat width, unrestricted float height, unrestricted float blur, unrestricted floa
t grayLevel, optional unrestricted float alpha); | 184 [MeasureAs=CanvasRenderingContext2DSetShadow] void setShadow(unrestricted fl
oat width, unrestricted float height, unrestricted float blur, unrestricted floa
t grayLevel, optional unrestricted float alpha = 1.0); |
185 [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); | 185 [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); |
186 [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); | 186 [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); |
187 }; | 187 }; |
188 | 188 |
189 CanvasRenderingContext2D implements CanvasPathMethods; | 189 CanvasRenderingContext2D implements CanvasPathMethods; |
OLD | NEW |