OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
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 SkPathMeasure_DEFINED | 8 #ifndef SkPathMeasure_DEFINED |
9 #define SkPathMeasure_DEFINED | 9 #define SkPathMeasure_DEFINED |
10 | 10 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 /** Pins distance to 0 <= distance <= getLength(), and then computes | 56 /** Pins distance to 0 <= distance <= getLength(), and then computes |
57 the corresponding matrix (by calling getPosTan). | 57 the corresponding matrix (by calling getPosTan). |
58 Returns false if there is no path, or a zero-length path was specified,
in which case | 58 Returns false if there is no path, or a zero-length path was specified,
in which case |
59 matrix is unchanged. | 59 matrix is unchanged. |
60 */ | 60 */ |
61 bool SK_WARN_UNUSED_RESULT getMatrix(SkScalar distance, SkMatrix* matrix, | 61 bool SK_WARN_UNUSED_RESULT getMatrix(SkScalar distance, SkMatrix* matrix, |
62 MatrixFlags flags = kGetPosAndTan_MatrixFlag); | 62 MatrixFlags flags = kGetPosAndTan_MatrixFlag); |
63 | 63 |
64 /** Given a start and stop distance, return in dst the intervening segment(s
). | 64 /** Given a start and stop distance, return in dst the intervening segment(s
). |
65 If the segment is zero-length, return false, else return true. | 65 If the segment is zero-length, return false, else return true. |
66 startD and stopD are pinned to legal values (0..getLength()). If startD
<= stopD | 66 startD and stopD are pinned to legal values (0..getLength()). If startD
> stopD |
67 then return false (and leave dst untouched). | 67 then return false (and leave dst untouched). |
68 Begin the segment with a moveTo if startWithMoveTo is true | 68 Begin the segment with a moveTo if startWithMoveTo is true |
69 */ | 69 */ |
70 bool getSegment(SkScalar startD, SkScalar stopD, SkPath* dst, bool startWith
MoveTo); | 70 bool getSegment(SkScalar startD, SkScalar stopD, SkPath* dst, bool startWith
MoveTo); |
71 | 71 |
72 /** Return true if the current contour is closed() | 72 /** Return true if the current contour is closed() |
73 */ | 73 */ |
74 bool isClosed(); | 74 bool isClosed(); |
75 | 75 |
76 /** Move to the next contour in the path. Return true if one exists, or fals
e if | 76 /** Move to the next contour in the path. Return true if one exists, or fals
e if |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 SkScalar compute_cubic_segs(const SkPoint pts[3], SkScalar distance, | 113 SkScalar compute_cubic_segs(const SkPoint pts[3], SkScalar distance, |
114 int mint, int maxt, int ptIndex); | 114 int mint, int maxt, int ptIndex); |
115 const Segment* distanceToSegment(SkScalar distance, SkScalar* t); | 115 const Segment* distanceToSegment(SkScalar distance, SkScalar* t); |
116 bool quad_too_curvy(const SkPoint pts[3]); | 116 bool quad_too_curvy(const SkPoint pts[3]); |
117 bool conic_too_curvy(const SkPoint& firstPt, const SkPoint& midTPt,const SkP
oint& lastPt); | 117 bool conic_too_curvy(const SkPoint& firstPt, const SkPoint& midTPt,const SkP
oint& lastPt); |
118 bool cheap_dist_exceeds_limit(const SkPoint& pt, SkScalar x, SkScalar y); | 118 bool cheap_dist_exceeds_limit(const SkPoint& pt, SkScalar x, SkScalar y); |
119 bool cubic_too_curvy(const SkPoint pts[4]); | 119 bool cubic_too_curvy(const SkPoint pts[4]); |
120 }; | 120 }; |
121 | 121 |
122 #endif | 122 #endif |
OLD | NEW |