Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Side by Side Diff: Source/core/html/canvas/CanvasRenderingContext2D.h

Issue 179383002: Add versions of isPointIn*() that take a Path parameter. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase again Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 void fill(const String& winding = "nonzero"); 150 void fill(const String& winding = "nonzero");
151 void fill(DOMPath*, ExceptionState&); 151 void fill(DOMPath*, ExceptionState&);
152 void fill(DOMPath*, const String& winding, ExceptionState&); 152 void fill(DOMPath*, const String& winding, ExceptionState&);
153 void stroke(); 153 void stroke();
154 void stroke(DOMPath*, ExceptionState&); 154 void stroke(DOMPath*, ExceptionState&);
155 void clip(const String& winding = "nonzero"); 155 void clip(const String& winding = "nonzero");
156 void clip(DOMPath*, ExceptionState&); 156 void clip(DOMPath*, ExceptionState&);
157 void clip(DOMPath*, const String& winding, ExceptionState&); 157 void clip(DOMPath*, const String& winding, ExceptionState&);
158 158
159 bool isPointInPath(const float x, const float y, const String& winding = "no nzero"); 159 bool isPointInPath(const float x, const float y, const String& winding = "no nzero");
160 bool isPointInPath(DOMPath*, const float x, const float y, ExceptionState&);
161 bool isPointInPath(DOMPath*, const float x, const float y, const String& win ding, ExceptionState&);
160 bool isPointInStroke(const float x, const float y); 162 bool isPointInStroke(const float x, const float y);
163 bool isPointInStroke(DOMPath*, const float x, const float y, ExceptionState& );
161 164
162 void clearRect(float x, float y, float width, float height); 165 void clearRect(float x, float y, float width, float height);
163 void fillRect(float x, float y, float width, float height); 166 void fillRect(float x, float y, float width, float height);
164 void strokeRect(float x, float y, float width, float height); 167 void strokeRect(float x, float y, float width, float height);
165 168
166 void setShadow(float width, float height, float blur); 169 void setShadow(float width, float height, float blur);
167 void setShadow(float width, float height, float blur, const String& color); 170 void setShadow(float width, float height, float blur, const String& color);
168 void setShadow(float width, float height, float blur, float grayLevel); 171 void setShadow(float width, float height, float blur, float grayLevel);
169 void setShadow(float width, float height, float blur, const String& color, f loat alpha); 172 void setShadow(float width, float height, float blur, const String& color, f loat alpha);
170 void setShadow(float width, float height, float blur, float grayLevel, float alpha); 173 void setShadow(float width, float height, float blur, float grayLevel, float alpha);
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 void unwindStateStack(); 307 void unwindStateStack();
305 void realizeSaves(); 308 void realizeSaves();
306 309
307 void applyStrokePattern(); 310 void applyStrokePattern();
308 void applyFillPattern(); 311 void applyFillPattern();
309 312
310 void fillInternal(const Path&, const String& windingRuleString); 313 void fillInternal(const Path&, const String& windingRuleString);
311 void strokeInternal(const Path&); 314 void strokeInternal(const Path&);
312 void clipInternal(const Path&, const String& windingRuleString); 315 void clipInternal(const Path&, const String& windingRuleString);
313 316
317 bool isPointInPathInternal(const Path&, const float x, const float y, const String& windingRuleString);
318 bool isPointInStrokeInternal(const Path&, const float x, const float y);
319
314 void drawTextInternal(const String& text, float x, float y, bool fill, float maxWidth = 0, bool useMaxWidth = false); 320 void drawTextInternal(const String& text, float x, float y, bool fill, float maxWidth = 0, bool useMaxWidth = false);
315 321
316 const Font& accessFont(); 322 const Font& accessFont();
317 323
318 void clearCanvas(); 324 void clearCanvas();
319 bool rectContainsTransformedRect(const FloatRect&, const FloatRect&) const; 325 bool rectContainsTransformedRect(const FloatRect&, const FloatRect&) const;
320 326
321 void inflateStrokeRect(FloatRect&) const; 327 void inflateStrokeRect(FloatRect&) const;
322 328
323 template<class T> void fullCanvasCompositedFill(const T&); 329 template<class T> void fullCanvasCompositedFill(const T&);
(...skipping 15 matching lines...) Expand all
339 bool m_usesCSSCompatibilityParseMode; 345 bool m_usesCSSCompatibilityParseMode;
340 bool m_hasAlpha; 346 bool m_hasAlpha;
341 MutableStylePropertyMap m_fetchedFonts; 347 MutableStylePropertyMap m_fetchedFonts;
342 }; 348 };
343 349
344 DEFINE_TYPE_CASTS(CanvasRenderingContext2D, CanvasRenderingContext, context, con text->is2d(), context.is2d()); 350 DEFINE_TYPE_CASTS(CanvasRenderingContext2D, CanvasRenderingContext, context, con text->is2d(), context.is2d());
345 351
346 } // namespace WebCore 352 } // namespace WebCore
347 353
348 #endif 354 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698