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

Side by Side Diff: Source/platform/graphics/Path.h

Issue 99103006: Moving GraphicsContext and dependencies from core to platform. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Final patch - fixes Android Created 7 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2003, 2006, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2006, 2009 Apple Inc. All rights reserved.
3 * 2006 Rob Buis <buis@kde.org> 3 * 2006 Rob Buis <buis@kde.org>
4 * Copyright (C) 2007-2008 Torch Mobile, Inc. 4 * Copyright (C) 2007-2008 Torch Mobile, Inc.
5 * Copyright (C) 2013 Google Inc. All rights reserved. 5 * Copyright (C) 2013 Google Inc. All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 11 matching lines...) Expand all
22 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 22 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
23 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 23 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
24 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */ 27 */
28 28
29 #ifndef Path_h 29 #ifndef Path_h
30 #define Path_h 30 #define Path_h
31 31
32 #include "platform/PlatformExport.h"
32 #include "platform/geometry/RoundedRect.h" 33 #include "platform/geometry/RoundedRect.h"
33 #include "platform/graphics/WindRule.h" 34 #include "platform/graphics/WindRule.h"
34 #include "third_party/skia/include/core/SkPath.h" 35 #include "third_party/skia/include/core/SkPath.h"
35 #include "wtf/FastAllocBase.h" 36 #include "wtf/FastAllocBase.h"
36 #include "wtf/Forward.h" 37 #include "wtf/Forward.h"
37 38
38 class SkPath; 39 class SkPath;
39 40
40 namespace WebCore { 41 namespace WebCore {
41 42
(...skipping 15 matching lines...) Expand all
57 // The points in the sturcture are the same as those that would be used with the 58 // The points in the sturcture are the same as those that would be used with the
58 // add... method. For example, a line returns the endpoint, while a cubic return s 59 // add... method. For example, a line returns the endpoint, while a cubic return s
59 // two tangent points and the endpoint. 60 // two tangent points and the endpoint.
60 struct PathElement { 61 struct PathElement {
61 PathElementType type; 62 PathElementType type;
62 FloatPoint* points; 63 FloatPoint* points;
63 }; 64 };
64 65
65 typedef void (*PathApplierFunction)(void* info, const PathElement*); 66 typedef void (*PathApplierFunction)(void* info, const PathElement*);
66 67
67 class Path { 68 class PLATFORM_EXPORT Path {
68 WTF_MAKE_FAST_ALLOCATED; 69 WTF_MAKE_FAST_ALLOCATED;
69 public: 70 public:
70 Path(); 71 Path();
71 ~Path(); 72 ~Path();
72 73
73 Path(const Path&); 74 Path(const Path&);
74 Path& operator=(const Path&); 75 Path& operator=(const Path&);
75 bool operator==(const Path&) const; 76 bool operator==(const Path&) const;
76 77
77 bool contains(const FloatPoint&, WindRule = RULE_NONZERO) const; 78 bool contains(const FloatPoint&, WindRule = RULE_NONZERO) const;
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 126
126 private: 127 private:
127 void addEllipse(const FloatPoint&, float radiusX, float radiusY, float start Angle, float endAngle, bool anticlockwise); 128 void addEllipse(const FloatPoint&, float radiusX, float radiusY, float start Angle, float endAngle, bool anticlockwise);
128 129
129 SkPath m_path; 130 SkPath m_path;
130 }; 131 };
131 132
132 } 133 }
133 134
134 #endif 135 #endif
OLDNEW
« no previous file with comments | « Source/platform/graphics/OpaqueRectTrackingContentLayerDelegate.cpp ('k') | Source/platform/graphics/Path.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698