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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 void clip(const String& winding = "nonzero"); | 157 void clip(const String& winding = "nonzero"); |
158 void clip(Path2D*, ExceptionState&); | 158 void clip(Path2D*, ExceptionState&); |
159 void clip(Path2D*, const String& winding, ExceptionState&); | 159 void clip(Path2D*, const String& winding, ExceptionState&); |
160 | 160 |
161 bool isPointInPath(const float x, const float y, const String& winding = "no
nzero"); | 161 bool isPointInPath(const float x, const float y, const String& winding = "no
nzero"); |
162 bool isPointInPath(Path2D*, const float x, const float y, ExceptionState&); | 162 bool isPointInPath(Path2D*, const float x, const float y, ExceptionState&); |
163 bool isPointInPath(Path2D*, const float x, const float y, const String& wind
ing, ExceptionState&); | 163 bool isPointInPath(Path2D*, const float x, const float y, const String& wind
ing, ExceptionState&); |
164 bool isPointInStroke(const float x, const float y); | 164 bool isPointInStroke(const float x, const float y); |
165 bool isPointInStroke(Path2D*, const float x, const float y, ExceptionState&)
; | 165 bool isPointInStroke(Path2D*, const float x, const float y, ExceptionState&)
; |
166 | 166 |
| 167 void scrollPathIntoView(); |
| 168 void scrollPathIntoView(Path2D*, ExceptionState&); |
| 169 |
167 void clearRect(float x, float y, float width, float height); | 170 void clearRect(float x, float y, float width, float height); |
168 void fillRect(float x, float y, float width, float height); | 171 void fillRect(float x, float y, float width, float height); |
169 void strokeRect(float x, float y, float width, float height); | 172 void strokeRect(float x, float y, float width, float height); |
170 | 173 |
171 void setShadow(float width, float height, float blur); | 174 void setShadow(float width, float height, float blur); |
172 void setShadow(float width, float height, float blur, const String& color); | 175 void setShadow(float width, float height, float blur, const String& color); |
173 void setShadow(float width, float height, float blur, float grayLevel); | 176 void setShadow(float width, float height, float blur, float grayLevel); |
174 void setShadow(float width, float height, float blur, const String& color, f
loat alpha); | 177 void setShadow(float width, float height, float blur, const String& color, f
loat alpha); |
175 void setShadow(float width, float height, float blur, float grayLevel, float
alpha); | 178 void setShadow(float width, float height, float blur, float grayLevel, float
alpha); |
176 void setShadow(float width, float height, float blur, float r, float g, floa
t b, float a); | 179 void setShadow(float width, float height, float blur, float r, float g, floa
t b, float a); |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 void drawImageInternal(CanvasImageSource*, float sx, float sy, float sw, flo
at sh, float dx, float dy, float dw, float dh, ExceptionState&, CompositeOperato
r, blink::WebBlendMode); | 303 void drawImageInternal(CanvasImageSource*, float sx, float sy, float sw, flo
at sh, float dx, float dy, float dw, float dh, ExceptionState&, CompositeOperato
r, blink::WebBlendMode); |
301 void drawVideo(HTMLVideoElement*, FloatRect srcRect, FloatRect dstRect); | 304 void drawVideo(HTMLVideoElement*, FloatRect srcRect, FloatRect dstRect); |
302 | 305 |
303 void fillInternal(const Path&, const String& windingRuleString); | 306 void fillInternal(const Path&, const String& windingRuleString); |
304 void strokeInternal(const Path&); | 307 void strokeInternal(const Path&); |
305 void clipInternal(const Path&, const String& windingRuleString); | 308 void clipInternal(const Path&, const String& windingRuleString); |
306 | 309 |
307 bool isPointInPathInternal(const Path&, const float x, const float y, const
String& windingRuleString); | 310 bool isPointInPathInternal(const Path&, const float x, const float y, const
String& windingRuleString); |
308 bool isPointInStrokeInternal(const Path&, const float x, const float y); | 311 bool isPointInStrokeInternal(const Path&, const float x, const float y); |
309 | 312 |
| 313 void scrollPathIntoViewInternal(const Path&); |
| 314 |
310 void drawTextInternal(const String& text, float x, float y, bool fill, float
maxWidth = 0, bool useMaxWidth = false); | 315 void drawTextInternal(const String& text, float x, float y, bool fill, float
maxWidth = 0, bool useMaxWidth = false); |
311 | 316 |
312 const Font& accessFont(); | 317 const Font& accessFont(); |
313 int getFontBaseline(const FontMetrics&) const; | 318 int getFontBaseline(const FontMetrics&) const; |
314 | 319 |
315 void clearCanvas(); | 320 void clearCanvas(); |
316 bool rectContainsTransformedRect(const FloatRect&, const FloatRect&) const; | 321 bool rectContainsTransformedRect(const FloatRect&, const FloatRect&) const; |
317 | 322 |
318 void inflateStrokeRect(FloatRect&) const; | 323 void inflateStrokeRect(FloatRect&) const; |
| 324 void absoluteBoundingPathRect(const Path&, LayoutRect&) const; |
319 | 325 |
320 template<class T> void fullCanvasCompositedFill(const T&); | 326 template<class T> void fullCanvasCompositedFill(const T&); |
321 template<class T> void fullCanvasCompositedDrawImage(T*, const FloatRect&, c
onst FloatRect&, CompositeOperator); | 327 template<class T> void fullCanvasCompositedDrawImage(T*, const FloatRect&, c
onst FloatRect&, CompositeOperator); |
322 | 328 |
323 bool focusRingCallIsValid(const Path&, Element*); | 329 bool focusRingCallIsValid(const Path&, Element*); |
324 void updateFocusRingAccessibility(const Path&, Element*); | 330 void updateFocusRingAccessibility(const Path&, Element*); |
325 void drawFocusRing(const Path&); | 331 void drawFocusRing(const Path&); |
326 | 332 |
327 virtual bool is2d() const OVERRIDE { return true; } | 333 virtual bool is2d() const OVERRIDE { return true; } |
328 virtual bool isAccelerated() const OVERRIDE; | 334 virtual bool isAccelerated() const OVERRIDE; |
329 virtual bool hasAlpha() const OVERRIDE { return m_hasAlpha; } | 335 virtual bool hasAlpha() const OVERRIDE { return m_hasAlpha; } |
330 | 336 |
331 virtual bool isTransformInvertible() const OVERRIDE { return state().m_inver
tibleCTM; } | 337 virtual bool isTransformInvertible() const OVERRIDE { return state().m_inver
tibleCTM; } |
332 | 338 |
333 virtual blink::WebLayer* platformLayer() const OVERRIDE; | 339 virtual blink::WebLayer* platformLayer() const OVERRIDE; |
334 | 340 |
335 Vector<State, 1> m_stateStack; | 341 Vector<State, 1> m_stateStack; |
336 bool m_usesCSSCompatibilityParseMode; | 342 bool m_usesCSSCompatibilityParseMode; |
337 bool m_hasAlpha; | 343 bool m_hasAlpha; |
338 MutableStylePropertyMap m_fetchedFonts; | 344 MutableStylePropertyMap m_fetchedFonts; |
339 }; | 345 }; |
340 | 346 |
341 DEFINE_TYPE_CASTS(CanvasRenderingContext2D, CanvasRenderingContext, context, con
text->is2d(), context.is2d()); | 347 DEFINE_TYPE_CASTS(CanvasRenderingContext2D, CanvasRenderingContext, context, con
text->is2d(), context.is2d()); |
342 | 348 |
343 } // namespace WebCore | 349 } // namespace WebCore |
344 | 350 |
345 #endif | 351 #endif |
OLD | NEW |