OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2009, 2010, 2011, 2012 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2006, 2007, 2009, 2010, 2011, 2012 Apple Inc. All rights reserv
ed. |
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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 } | 132 } |
133 void setCurrentTransform(PassRefPtrWillBeRawPtr<SVGMatrixTearOff>); | 133 void setCurrentTransform(PassRefPtrWillBeRawPtr<SVGMatrixTearOff>); |
134 | 134 |
135 void scale(float sx, float sy); | 135 void scale(float sx, float sy); |
136 void rotate(float angleInRadians); | 136 void rotate(float angleInRadians); |
137 void translate(float tx, float ty); | 137 void translate(float tx, float ty); |
138 void transform(float m11, float m12, float m21, float m22, float dx, float d
y); | 138 void transform(float m11, float m12, float m21, float m22, float dx, float d
y); |
139 void setTransform(float m11, float m12, float m21, float m22, float dx, floa
t dy); | 139 void setTransform(float m11, float m12, float m21, float m22, float dx, floa
t dy); |
140 void resetTransform(); | 140 void resetTransform(); |
141 | 141 |
142 void setStrokeColor(const String& color); | |
143 void setStrokeColor(float grayLevel); | |
144 void setStrokeColor(const String& color, float alpha); | |
145 void setStrokeColor(float grayLevel, float alpha); | |
146 void setStrokeColor(float r, float g, float b, float a); | |
147 void setStrokeColor(float c, float m, float y, float k, float a); | |
148 | |
149 void setFillColor(const String& color); | |
150 void setFillColor(float grayLevel); | |
151 void setFillColor(const String& color, float alpha); | |
152 void setFillColor(float grayLevel, float alpha); | |
153 void setFillColor(float r, float g, float b, float a); | |
154 void setFillColor(float c, float m, float y, float k, float a); | |
155 | |
156 void beginPath(); | 142 void beginPath(); |
157 | 143 |
158 void fill(const String& winding = "nonzero"); | 144 void fill(const String& winding = "nonzero"); |
159 void fill(Path2D*, const String& winding = "nonzero"); | 145 void fill(Path2D*, const String& winding = "nonzero"); |
160 void stroke(); | 146 void stroke(); |
161 void stroke(Path2D*); | 147 void stroke(Path2D*); |
162 void clip(const String& winding = "nonzero"); | 148 void clip(const String& winding = "nonzero"); |
163 void clip(Path2D*, const String& winding = "nonzero"); | 149 void clip(Path2D*, const String& winding = "nonzero"); |
164 | 150 |
165 bool isPointInPath(const float x, const float y, const String& winding = "no
nzero"); | 151 bool isPointInPath(const float x, const float y, const String& winding = "no
nzero"); |
166 bool isPointInPath(Path2D*, const float x, const float y, const String& wind
ing = "nonzero"); | 152 bool isPointInPath(Path2D*, const float x, const float y, const String& wind
ing = "nonzero"); |
167 bool isPointInStroke(const float x, const float y); | 153 bool isPointInStroke(const float x, const float y); |
168 bool isPointInStroke(Path2D*, const float x, const float y); | 154 bool isPointInStroke(Path2D*, const float x, const float y); |
169 | 155 |
170 void scrollPathIntoView(); | 156 void scrollPathIntoView(); |
171 void scrollPathIntoView(Path2D*); | 157 void scrollPathIntoView(Path2D*); |
172 | 158 |
173 void clearRect(float x, float y, float width, float height); | 159 void clearRect(float x, float y, float width, float height); |
174 void fillRect(float x, float y, float width, float height); | 160 void fillRect(float x, float y, float width, float height); |
175 void strokeRect(float x, float y, float width, float height); | 161 void strokeRect(float x, float y, float width, float height); |
176 | 162 |
177 void setShadow(float width, float height, float blur); | |
178 void setShadow(float width, float height, float blur, const String& color); | |
179 void setShadow(float width, float height, float blur, float grayLevel); | |
180 void setShadow(float width, float height, float blur, const String& color, f
loat alpha); | |
181 void setShadow(float width, float height, float blur, float grayLevel, float
alpha); | |
182 void setShadow(float width, float height, float blur, float r, float g, floa
t b, float a); | |
183 void setShadow(float width, float height, float blur, float c, float m, floa
t y, float k, float a); | |
184 | |
185 void clearShadow(); | |
186 | |
187 void drawImage(const CanvasImageSourceUnion&, float x, float y, ExceptionSta
te&); | 163 void drawImage(const CanvasImageSourceUnion&, float x, float y, ExceptionSta
te&); |
188 void drawImage(const CanvasImageSourceUnion&, float x, float y, float width,
float height, ExceptionState&); | 164 void drawImage(const CanvasImageSourceUnion&, float x, float y, float width,
float height, ExceptionState&); |
189 void drawImage(const CanvasImageSourceUnion&, float sx, float sy, float sw,
float sh, float dx, float dy, float dw, float dh, ExceptionState&); | 165 void drawImage(const CanvasImageSourceUnion&, float sx, float sy, float sw,
float sh, float dx, float dy, float dw, float dh, ExceptionState&); |
190 | 166 |
191 void drawImageFromRect(HTMLImageElement*, float sx = 0, float sy = 0, float
sw = 0, float sh = 0, | |
192 float dx = 0, float dy = 0, float dw = 0, float dh =
0, const String& compositeOperation = emptyString()); | |
193 | |
194 void setAlpha(float); | |
195 | |
196 void setCompositeOperation(const String&); | |
197 | |
198 PassRefPtrWillBeRawPtr<CanvasGradient> createLinearGradient(float x0, float
y0, float x1, float y1); | 167 PassRefPtrWillBeRawPtr<CanvasGradient> createLinearGradient(float x0, float
y0, float x1, float y1); |
199 PassRefPtrWillBeRawPtr<CanvasGradient> createRadialGradient(float x0, float
y0, float r0, float x1, float y1, float r1, ExceptionState&); | 168 PassRefPtrWillBeRawPtr<CanvasGradient> createRadialGradient(float x0, float
y0, float r0, float x1, float y1, float r1, ExceptionState&); |
200 PassRefPtrWillBeRawPtr<CanvasPattern> createPattern(const CanvasImageSourceU
nion&, const String& repetitionType, ExceptionState&); | 169 PassRefPtrWillBeRawPtr<CanvasPattern> createPattern(const CanvasImageSourceU
nion&, const String& repetitionType, ExceptionState&); |
201 | 170 |
202 PassRefPtrWillBeRawPtr<ImageData> createImageData(PassRefPtrWillBeRawPtr<Ima
geData>) const; | 171 PassRefPtrWillBeRawPtr<ImageData> createImageData(PassRefPtrWillBeRawPtr<Ima
geData>) const; |
203 PassRefPtrWillBeRawPtr<ImageData> createImageData(float width, float height,
ExceptionState&) const; | 172 PassRefPtrWillBeRawPtr<ImageData> createImageData(float width, float height,
ExceptionState&) const; |
204 PassRefPtrWillBeRawPtr<ImageData> getImageData(float sx, float sy, float sw,
float sh, ExceptionState&) const; | 173 PassRefPtrWillBeRawPtr<ImageData> getImageData(float sx, float sy, float sw,
float sh, ExceptionState&) const; |
205 void putImageData(ImageData*, float dx, float dy); | 174 void putImageData(ImageData*, float dx, float dy); |
206 void putImageData(ImageData*, float dx, float dy, float dirtyX, float dirtyY
, float dirtyWidth, float dirtyHeight); | 175 void putImageData(ImageData*, float dx, float dy, float dirtyX, float dirtyY
, float dirtyWidth, float dirtyHeight); |
207 | 176 |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
391 Timer<CanvasRenderingContext2D> m_dispatchContextLostEventTimer; | 360 Timer<CanvasRenderingContext2D> m_dispatchContextLostEventTimer; |
392 Timer<CanvasRenderingContext2D> m_dispatchContextRestoredEventTimer; | 361 Timer<CanvasRenderingContext2D> m_dispatchContextRestoredEventTimer; |
393 Timer<CanvasRenderingContext2D> m_tryRestoreContextEventTimer; | 362 Timer<CanvasRenderingContext2D> m_tryRestoreContextEventTimer; |
394 }; | 363 }; |
395 | 364 |
396 DEFINE_TYPE_CASTS(CanvasRenderingContext2D, CanvasRenderingContext, context, con
text->is2d(), context.is2d()); | 365 DEFINE_TYPE_CASTS(CanvasRenderingContext2D, CanvasRenderingContext, context, con
text->is2d(), context.is2d()); |
397 | 366 |
398 } // namespace blink | 367 } // namespace blink |
399 | 368 |
400 #endif // CanvasRenderingContext2D_h | 369 #endif // CanvasRenderingContext2D_h |
OLD | NEW |