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 // FIXME: Simplify these using optional CanvasFillRule once crbug.com/339000
gets fixed. | 91 void fill(optional CanvasFillRule winding); |
92 void fill(); | 92 [RuntimeEnabled=Path2D] void fill(Path2D path, optional CanvasFillRule windi
ng); |
93 void fill(CanvasFillRule winding); | |
94 [RuntimeEnabled=Path2D] void fill(Path2D path); | |
95 [RuntimeEnabled=Path2D] void fill(Path2D path, CanvasFillRule winding); | |
96 void stroke(); | 93 void stroke(); |
97 [RuntimeEnabled=Path2D] void stroke(Path2D path); | 94 [RuntimeEnabled=Path2D] void stroke(Path2D path); |
98 // Focus rings | 95 // Focus rings |
99 void drawFocusIfNeeded(Element element); | 96 void drawFocusIfNeeded(Element element); |
100 [RuntimeEnabled=Path2D] void drawFocusIfNeeded(Path2D path, Element element)
; | 97 [RuntimeEnabled=Path2D] void drawFocusIfNeeded(Path2D path, Element element)
; |
101 | 98 |
102 [RuntimeEnabled=ExperimentalCanvasFeatures] void scrollPathIntoView(); | 99 [RuntimeEnabled=ExperimentalCanvasFeatures] void scrollPathIntoView(optional
Path2D path); |
103 [RuntimeEnabled=ExperimentalCanvasFeatures] void scrollPathIntoView(Path2D p
ath); | 100 void clip(optional CanvasFillRule winding); |
104 // FIXME: Simplify these using optional CanvasFillRule once crbug.com/339000
gets fixed. | 101 [RuntimeEnabled=Path2D] void clip(Path2D path, optional CanvasFillRule windi
ng); |
105 void clip(); | 102 boolean isPointInPath(unrestricted float x, unrestricted float y, optional C
anvasFillRule winding); |
106 void clip(CanvasFillRule winding); | 103 [RuntimeEnabled=Path2D] boolean isPointInPath(Path2D path, unrestricted floa
t x, unrestricted float y, optional CanvasFillRule winding); |
107 [RuntimeEnabled=Path2D] void clip(Path2D path); | |
108 [RuntimeEnabled=Path2D] void clip(Path2D path, CanvasFillRule winding); | |
109 // FIXME: Simplify these using optional CanvasFillRule once crbug.com/339000
gets fixed. | |
110 boolean isPointInPath(unrestricted float x, unrestricted float y); | |
111 boolean isPointInPath(unrestricted float x, unrestricted float y, CanvasFill
Rule winding); | |
112 [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, CanvasFillRule winding); | |
114 boolean isPointInStroke(unrestricted float x, unrestricted float y); | 104 boolean isPointInStroke(unrestricted float x, unrestricted float y); |
115 [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); |
116 | 106 |
117 // text (see also the CanvasDrawingStyles interface) | 107 // text (see also the CanvasDrawingStyles interface) |
118 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); |
119 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); |
120 TextMetrics measureText(DOMString text); | 110 TextMetrics measureText(DOMString text); |
121 | 111 |
122 // drawing images | 112 // drawing images |
123 [RaisesException] void drawImage(HTMLImageElement image, unrestricted float
x, unrestricted float y); | 113 [RaisesException] void drawImage(HTMLImageElement image, unrestricted float
x, unrestricted float y); |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 [MeasureAs=CanvasRenderingContext2DDrawImageFromRect] void drawImageFromRect
( | 173 [MeasureAs=CanvasRenderingContext2DDrawImageFromRect] void drawImageFromRect
( |
184 HTMLImageElement? image, optional unrestricted float sx, optional unrest
ricted float sy, optional unrestricted float sw, optional unrestricted float sh, | 174 HTMLImageElement? image, optional unrestricted float sx, optional unrest
ricted float sy, optional unrestricted float sw, optional unrestricted float sh, |
185 optional unrestricted float dx, optional unrestricted float dy, optional
unrestricted float dw, optional unrestricted float dh, optional DOMString compo
siteOperation); | 175 optional unrestricted float dx, optional unrestricted float dy, optional
unrestricted float dw, optional unrestricted float dh, optional DOMString compo
siteOperation); |
186 [MeasureAs=CanvasRenderingContext2DSetShadow] void setShadow(unrestricted fl
oat width, unrestricted float height, unrestricted float blur, optional DOMStrin
g color, optional unrestricted float alpha); | 176 [MeasureAs=CanvasRenderingContext2DSetShadow] void setShadow(unrestricted fl
oat width, unrestricted float height, unrestricted float blur, optional DOMStrin
g color, optional unrestricted float alpha); |
187 [MeasureAs=CanvasRenderingContext2DSetShadow] void setShadow(unrestricted fl
oat width, unrestricted float height, unrestricted float blur, unrestricted floa
t grayLevel, optional unrestricted float alpha); | 177 [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 r, unrestricted float g, unrestricted float b, unrestricted float a); | 178 [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 c, unrestricted float m, unrestricted float y, unrestricted float k, unrestric
ted float a); | 179 [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 }; | 180 }; |
191 | 181 |
192 CanvasRenderingContext2D implements CanvasPathMethods; | 182 CanvasRenderingContext2D implements CanvasPathMethods; |
OLD | NEW |