OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef SkPathPriv_DEFINED | 8 #ifndef SkPathPriv_DEFINED |
9 #define SkPathPriv_DEFINED | 9 #define SkPathPriv_DEFINED |
10 | 10 |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
91 */ | 91 */ |
92 static bool IsSimpleClosedRect(const SkPath& path, SkRect* rect, SkPath::Dir ection* direction, | 92 static bool IsSimpleClosedRect(const SkPath& path, SkRect* rect, SkPath::Dir ection* direction, |
93 unsigned* start); | 93 unsigned* start); |
94 | 94 |
95 /** | 95 /** |
96 * Creates a path from arc params using the semantics of SkCanvas::drawArc. This function | 96 * Creates a path from arc params using the semantics of SkCanvas::drawArc. This function |
97 * assumes empty ovals and zero sweeps have already been filtered out. | 97 * assumes empty ovals and zero sweeps have already been filtered out. |
98 */ | 98 */ |
99 static void CreateDrawArcPath(SkPath* path, const SkRect& oval, SkScalar sta rtAngle, | 99 static void CreateDrawArcPath(SkPath* path, const SkRect& oval, SkScalar sta rtAngle, |
100 SkScalar sweepAngle, bool useCenter, bool isFi llNoPathEffect); | 100 SkScalar sweepAngle, bool useCenter, bool isFi llNoPathEffect); |
101 | |
102 /** | |
103 * Returns a pointer to the verb data. Note that the verbs are stored backwa rds in memory and | |
104 * thus the returned pointer is the last verb. | |
105 */ | |
106 static const uint8_t* VerbData(const SkPath& path) { | |
107 return path.fPathRef->verbsMemBegin(); | |
108 } | |
109 | |
robertphillips
2016/09/21 13:37:46
point -> pointer ?
bsalomon
2016/09/21 14:17:35
Done.
| |
110 /** Returns a raw point to the path points */ | |
111 static const SkPoint* PointData(const SkPath& path) { | |
112 return path.fPathRef->points(); | |
113 } | |
114 | |
115 /** Returns the number of conic weights in the path */ | |
116 static int ConicWeightCnt(const SkPath& path) { | |
117 return path.fPathRef->countWeights(); | |
118 } | |
119 | |
robertphillips
2016/09/21 13:37:46
same here ?
bsalomon
2016/09/21 14:17:35
Done.
| |
120 /** Returns a raw point to the path conic weights. */ | |
121 static const SkScalar* ConicWeightData(const SkPath& path) { | |
122 return path.fPathRef->conicWeights(); | |
123 } | |
101 }; | 124 }; |
102 | 125 |
103 #endif | 126 #endif |
OLD | NEW |