OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 SkPathOpsQuad_DEFINED | 8 #ifndef SkPathOpsQuad_DEFINED |
9 #define SkPathOpsQuad_DEFINED | 9 #define SkPathOpsQuad_DEFINED |
10 | 10 |
(...skipping 24 matching lines...) Expand all Loading... |
35 | 35 |
36 static int AddValidTs(double s[], int realRoots, double* t); | 36 static int AddValidTs(double s[], int realRoots, double* t); |
37 void align(int endIndex, SkDPoint* dstPt) const; | 37 void align(int endIndex, SkDPoint* dstPt) const; |
38 SkDQuadPair chopAt(double t) const; | 38 SkDQuadPair chopAt(double t) const; |
39 SkDVector dxdyAtT(double t) const; | 39 SkDVector dxdyAtT(double t) const; |
40 static int FindExtrema(double a, double b, double c, double tValue[1]); | 40 static int FindExtrema(double a, double b, double c, double tValue[1]); |
41 bool isLinear(int startIndex, int endIndex) const; | 41 bool isLinear(int startIndex, int endIndex) const; |
42 bool monotonicInY() const; | 42 bool monotonicInY() const; |
43 double nearestT(const SkDPoint&) const; | 43 double nearestT(const SkDPoint&) const; |
44 bool pointInHull(const SkDPoint&) const; | 44 bool pointInHull(const SkDPoint&) const; |
| 45 SkDPoint ptAtT(double t) const; |
45 static int RootsReal(double A, double B, double C, double t[2]); | 46 static int RootsReal(double A, double B, double C, double t[2]); |
46 static int RootsValidT(const double A, const double B, const double C, doubl
e s[2]); | 47 static int RootsValidT(const double A, const double B, const double C, doubl
e s[2]); |
47 static void SetABC(const double* quad, double* a, double* b, double* c); | 48 static void SetABC(const double* quad, double* a, double* b, double* c); |
48 SkDQuad subDivide(double t1, double t2) const; | 49 SkDQuad subDivide(double t1, double t2) const; |
49 static SkDQuad SubDivide(const SkPoint a[3], double t1, double t2) { | 50 static SkDQuad SubDivide(const SkPoint a[3], double t1, double t2) { |
50 SkDQuad quad; | 51 SkDQuad quad; |
51 quad.set(a); | 52 quad.set(a); |
52 return quad.subDivide(t1, t2); | 53 return quad.subDivide(t1, t2); |
53 } | 54 } |
54 SkDPoint subDivide(const SkDPoint& a, const SkDPoint& c, double t1, double t
2) const; | 55 SkDPoint subDivide(const SkDPoint& a, const SkDPoint& c, double t1, double t
2) const; |
55 static SkDPoint SubDivide(const SkPoint pts[3], const SkDPoint& a, const SkD
Point& c, | 56 static SkDPoint SubDivide(const SkPoint pts[3], const SkDPoint& a, const SkD
Point& c, |
56 double t1, double t2) { | 57 double t1, double t2) { |
57 SkDQuad quad; | 58 SkDQuad quad; |
58 quad.set(pts); | 59 quad.set(pts); |
59 return quad.subDivide(a, c, t1, t2); | 60 return quad.subDivide(a, c, t1, t2); |
60 } | 61 } |
61 SkDCubic toCubic() const; | 62 SkDCubic toCubic() const; |
62 SkDPoint top(double startT, double endT) const; | 63 SkDPoint top(double startT, double endT) const; |
63 SkDPoint xyAtT(double t) const; | |
64 private: | 64 private: |
65 // static double Tangent(const double* quadratic, double t); // uncalled | 65 // static double Tangent(const double* quadratic, double t); // uncalled |
66 }; | 66 }; |
67 | 67 |
68 #endif | 68 #endif |
OLD | NEW |