Lines Matching refs:path

55     static bool IsClosedSingleContour(const SkPath& path) {
56 int verbCount = path.countVerbs();
60 auto verbs = path.fPathRef->verbsBegin();
83 static int LeadingMoveToCount(const SkPath& path) {
84 int verbCount = path.countVerbs();
85 auto verbs = path.fPathRef->verbsBegin();
91 return verbCount; // path is all move verbs
94 static void AddGenIDChangeListener(const SkPath& path, sk_sp<SkIDChangeListener> listener) {
95 path.fPathRef->addGenIDChangeListener(std::move(listener));
103 static bool IsSimpleRect(const SkPath& path, bool isSimpleFill, SkRect* rect,
107 * Creates a path from arc params using the semantics of SkCanvas::drawArc. This function
110 static void CreateDrawArcPath(SkPath* path, const SkRect& oval, SkScalar startAngle,
119 static void ShrinkToFit(SkPath* path) {
120 path->shrinkToFit();
124 * Returns a C++11-iterable object that traverses a path's verbs in order. e.g:
126 * for (SkPath::Verb verb : SkPathPriv::Verbs(path)) {
132 Verbs(const SkPath& path) : fPathRef(path.fPathRef.get()) {}
148 * Iterates through a raw range of path verbs, points, and conics. All values are returned
156 * Iterable object for traversing verbs, points, and conic weights in a path:
164 Iterate(const SkPath& path)
165 : Iterate(path.fPathRef->verbsBegin(),
167 (!path.isFinite()) ? path.fPathRef->verbsBegin()
168 : path.fPathRef->verbsEnd(),
169 path.fPathRef->points(), path.fPathRef->conicWeights()) {
187 static const uint8_t* VerbData(const SkPath& path) {
188 return path.fPathRef->verbsBegin();
191 /** Returns a raw pointer to the path points */
192 static const SkPoint* PointData(const SkPath& path) {
193 return path.fPathRef->points();
196 /** Returns the number of conic weights in the path */
197 static int ConicWeightCnt(const SkPath& path) {
198 return path.fPathRef->countWeights();
201 /** Returns a raw pointer to the path conic weights. */
202 static const SkScalar* ConicWeightData(const SkPath& path) {
203 return path.fPathRef->conicWeights();
207 static bool TestingOnly_unique(const SkPath& path) {
208 return path.fPathRef->unique();
211 // Won't be needed once we can make path's immutable (with their bounds always computed)
212 static bool HasComputedBounds(const SkPath& path) {
213 return path.hasComputedBounds();
234 static bool IsOval(const SkPath& path, SkRect* rect, SkPathDirection* dir, unsigned* start) {
236 bool result = path.fPathRef->isOval(rect, &isCCW, start);
261 static bool IsRRect(const SkPath& path, SkRRect* rrect, SkPathDirection* dir,
264 bool result = path.fPathRef->isRRect(rrect, &isCCW, start);
272 * Sometimes in the drawing pipeline, we have to perform math on path coordinates, even after
273 * the path is in device-coordinates. Tessellation and clipping are two examples. Usually this
276 * finite path values into infinities (or NaNs), we allow the upper drawing code to reject
277 * the path if its bounds (in device coordinates) is too close to max float.
289 static bool TooBigForMath(const SkPath& path) {
290 return TooBigForMath(path.getBounds());
326 static bool IsAxisAligned(const SkPath& path);
337 static int LastMoveToIndex(const SkPath& path) { return path.fLastMoveToIndex; }
373 * If needed (to not blow-up under a perspective matrix), clip the path, returning the
376 * Note result might be empty (if the path was completely clipped out).
383 * Gets the number of GenIDChangeListeners. If another thread has access to this path then
389 static void UpdatePathPoint(SkPath* path, int index, const SkPoint& pt) {
390 SkASSERT(index < path->countPoints());
391 SkPathRef::Editor ed(&path->fPathRef);
393 path->dirtyAfterEdit();
396 static SkPathConvexity GetConvexity(const SkPath& path) {
397 return path.getConvexity();
399 static SkPathConvexity GetConvexityOrUnknown(const SkPath& path) {
400 return path.getConvexityOrUnknown();
402 static void SetConvexity(const SkPath& path, SkPathConvexity c) {
403 path.setConvexity(c);
408 static void ForceComputeConvexity(const SkPath& path) {
409 path.setConvexity(SkPathConvexity::kUnknown);
410 (void)path.isConvex();
421 // Roughly the same as SkPath::Iter(path, true), but does not return moves or closes
439 SkPathEdgeIter(const SkPath& path);
462 // Returns true when it holds an Edge, false when the path is done.