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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 void setFillColor(const String& color, float alpha); | 141 void setFillColor(const String& color, float alpha); |
142 void setFillColor(float grayLevel, float alpha); | 142 void setFillColor(float grayLevel, float alpha); |
143 void setFillColor(float r, float g, float b, float a); | 143 void setFillColor(float r, float g, float b, float a); |
144 void setFillColor(float c, float m, float y, float k, float a); | 144 void setFillColor(float c, float m, float y, float k, float a); |
145 | 145 |
146 void beginPath(); | 146 void beginPath(); |
147 | 147 |
148 PassRefPtr<DOMPath> currentPath(); | 148 PassRefPtr<DOMPath> currentPath(); |
149 void setCurrentPath(DOMPath*); | 149 void setCurrentPath(DOMPath*); |
150 void fill(const String& winding = "nonzero"); | 150 void fill(const String& winding = "nonzero"); |
| 151 void fill(DOMPath*, const String& winding = "nonzero"); |
151 void stroke(); | 152 void stroke(); |
| 153 void stroke(DOMPath*); |
152 void clip(const String& winding = "nonzero"); | 154 void clip(const String& winding = "nonzero"); |
| 155 void clip(DOMPath*, const String& winding = "nonzero"); |
153 | 156 |
154 bool isPointInPath(const float x, const float y, const String& winding = "no
nzero"); | 157 bool isPointInPath(const float x, const float y, const String& winding = "no
nzero"); |
155 bool isPointInStroke(const float x, const float y); | 158 bool isPointInStroke(const float x, const float y); |
156 | 159 |
157 void clearRect(float x, float y, float width, float height); | 160 void clearRect(float x, float y, float width, float height); |
158 void fillRect(float x, float y, float width, float height); | 161 void fillRect(float x, float y, float width, float height); |
159 void strokeRect(float x, float y, float width, float height); | 162 void strokeRect(float x, float y, float width, float height); |
160 | 163 |
161 void setShadow(float width, float height, float blur); | 164 void setShadow(float width, float height, float blur); |
162 void setShadow(float width, float height, float blur, const String& color); | 165 void setShadow(float width, float height, float blur, const String& color); |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 void didDraw(const FloatRect&); | 298 void didDraw(const FloatRect&); |
296 | 299 |
297 GraphicsContext* drawingContext() const; | 300 GraphicsContext* drawingContext() const; |
298 | 301 |
299 void unwindStateStack(); | 302 void unwindStateStack(); |
300 void realizeSaves(); | 303 void realizeSaves(); |
301 | 304 |
302 void applyStrokePattern(); | 305 void applyStrokePattern(); |
303 void applyFillPattern(); | 306 void applyFillPattern(); |
304 | 307 |
| 308 void fillInternal(const Path&, const String& windingRuleString); |
| 309 void strokeInternal(const Path&); |
| 310 void clipInternal(const Path&, const String& windingRuleString); |
| 311 |
305 void drawTextInternal(const String& text, float x, float y, bool fill, float
maxWidth = 0, bool useMaxWidth = false); | 312 void drawTextInternal(const String& text, float x, float y, bool fill, float
maxWidth = 0, bool useMaxWidth = false); |
306 | 313 |
307 const Font& accessFont(); | 314 const Font& accessFont(); |
308 | 315 |
309 void clearCanvas(); | 316 void clearCanvas(); |
310 bool rectContainsTransformedRect(const FloatRect&, const FloatRect&) const; | 317 bool rectContainsTransformedRect(const FloatRect&, const FloatRect&) const; |
311 | 318 |
312 void inflateStrokeRect(FloatRect&) const; | 319 void inflateStrokeRect(FloatRect&) const; |
313 | 320 |
314 template<class T> void fullCanvasCompositedFill(const T&); | 321 template<class T> void fullCanvasCompositedFill(const T&); |
(...skipping 15 matching lines...) Expand all Loading... |
330 bool m_usesCSSCompatibilityParseMode; | 337 bool m_usesCSSCompatibilityParseMode; |
331 bool m_hasAlpha; | 338 bool m_hasAlpha; |
332 MutableStylePropertyMap m_fetchedFonts; | 339 MutableStylePropertyMap m_fetchedFonts; |
333 }; | 340 }; |
334 | 341 |
335 DEFINE_TYPE_CASTS(CanvasRenderingContext2D, CanvasRenderingContext, context, con
text->is2d(), context.is2d()); | 342 DEFINE_TYPE_CASTS(CanvasRenderingContext2D, CanvasRenderingContext, context, con
text->is2d(), context.is2d()); |
336 | 343 |
337 } // namespace WebCore | 344 } // namespace WebCore |
338 | 345 |
339 #endif | 346 #endif |
OLD | NEW |