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

Side by Side Diff: third_party/WebKit/Source/modules/canvas2d/HitRegion.h

Issue 1532923002: Add a Path::contains() version that use the Path's winding rule (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Forward declare Path in GC.h Created 5 years 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef HitRegion_h 5 #ifndef HitRegion_h
6 #define HitRegion_h 6 #define HitRegion_h
7 7
8 #include "core/dom/Element.h" 8 #include "core/dom/Element.h"
9 #include "modules/canvas2d/HitRegionOptions.h" 9 #include "modules/canvas2d/HitRegionOptions.h"
10 #include "platform/graphics/Path.h" 10 #include "platform/graphics/Path.h"
(...skipping 15 matching lines...) Expand all
26 26
27 virtual ~HitRegion() { } 27 virtual ~HitRegion() { }
28 28
29 void removePixels(const Path&); 29 void removePixels(const Path&);
30 30
31 bool contains(const FloatPoint&) const; 31 bool contains(const FloatPoint&) const;
32 32
33 const String& id() const { return m_id; } 33 const String& id() const { return m_id; }
34 const Path& path() const { return m_path; } 34 const Path& path() const { return m_path; }
35 Element* control() const { return m_control.get(); } 35 Element* control() const { return m_control.get(); }
36 WindRule fillRule() const { return m_fillRule; }
37 36
38 DECLARE_TRACE(); 37 DECLARE_TRACE();
39 38
40 private: 39 private:
41 HitRegion(const Path&, const HitRegionOptions&); 40 HitRegion(const Path&, const HitRegionOptions&);
42 41
43 String m_id; 42 String m_id;
44 RefPtrWillBeMember<Element> m_control; 43 RefPtrWillBeMember<Element> m_control;
45 Path m_path; 44 Path m_path;
46 WindRule m_fillRule; 45 WindRule m_fillRule;
(...skipping 30 matching lines...) Expand all
77 typedef WillBeHeapHashMap<RefPtrWillBeMember<Element>, RefPtrWillBeMember<Hi tRegion>> HitRegionControlMap; 76 typedef WillBeHeapHashMap<RefPtrWillBeMember<Element>, RefPtrWillBeMember<Hi tRegion>> HitRegionControlMap;
78 77
79 HitRegionList m_hitRegionList; 78 HitRegionList m_hitRegionList;
80 HitRegionIdMap m_hitRegionIdMap; 79 HitRegionIdMap m_hitRegionIdMap;
81 HitRegionControlMap m_hitRegionControlMap; 80 HitRegionControlMap m_hitRegionControlMap;
82 }; 81 };
83 82
84 } // namespace blink 83 } // namespace blink
85 84
86 #endif 85 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/style/SVGComputedStyle.h ('k') | third_party/WebKit/Source/platform/graphics/GraphicsContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698