| 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 SkPathOpsCubic_DEFINED | 8 #ifndef SkPathOpsCubic_DEFINED | 
| 9 #define SkPathOpsCubic_DEFINED | 9 #define SkPathOpsCubic_DEFINED | 
| 10 | 10 | 
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 90     bool monotonicInX() const; | 90     bool monotonicInX() const; | 
| 91     bool monotonicInY() const; | 91     bool monotonicInY() const; | 
| 92     void otherPts(int index, const SkDPoint* o1Pts[kPointCount - 1]) const; | 92     void otherPts(int index, const SkDPoint* o1Pts[kPointCount - 1]) const; | 
| 93     SkDPoint ptAtT(double t) const; | 93     SkDPoint ptAtT(double t) const; | 
| 94     static int RootsReal(double A, double B, double C, double D, double t[3]); | 94     static int RootsReal(double A, double B, double C, double D, double t[3]); | 
| 95     static int RootsValidT(const double A, const double B, const double C, doubl
     e D, double s[3]); | 95     static int RootsValidT(const double A, const double B, const double C, doubl
     e D, double s[3]); | 
| 96 | 96 | 
| 97     int searchRoots(double extremes[6], int extrema, double axisIntercept, | 97     int searchRoots(double extremes[6], int extrema, double axisIntercept, | 
| 98                     SearchAxis xAxis, double* validRoots) const; | 98                     SearchAxis xAxis, double* validRoots) const; | 
| 99 | 99 | 
|  | 100     /** | 
|  | 101      *  Return the number of valid roots (0 < root < 1) for this cubic intersect
     ing the | 
|  | 102      *  specified horizontal line. | 
|  | 103      */ | 
|  | 104     int horizontalIntersect(double yIntercept, double roots[3]) const; | 
|  | 105     /** | 
|  | 106      *  Return the number of valid roots (0 < root < 1) for this cubic intersect
     ing the | 
|  | 107      *  specified vertical line. | 
|  | 108      */ | 
|  | 109     int verticalIntersect(double xIntercept, double roots[3]) const; | 
|  | 110 | 
| 100     const SkDCubic& set(const SkPoint pts[kPointCount]) { | 111     const SkDCubic& set(const SkPoint pts[kPointCount]) { | 
| 101         fPts[0] = pts[0]; | 112         fPts[0] = pts[0]; | 
| 102         fPts[1] = pts[1]; | 113         fPts[1] = pts[1]; | 
| 103         fPts[2] = pts[2]; | 114         fPts[2] = pts[2]; | 
| 104         fPts[3] = pts[3]; | 115         fPts[3] = pts[3]; | 
| 105         return *this; | 116         return *this; | 
| 106     } | 117     } | 
| 107 | 118 | 
| 108     SkDCubic subDivide(double t1, double t2) const; | 119     SkDCubic subDivide(double t1, double t2) const; | 
| 109 | 120 | 
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 141    returned == 3 for (0, 1), (0, 2), (1, 3), (2, 3) | 152    returned == 3 for (0, 1), (0, 2), (1, 3), (2, 3) | 
| 142 given that: | 153 given that: | 
| 143    (0, 3) ^ 2 -> (2, 1)  (1, 2) ^ 2 -> (3, 0) | 154    (0, 3) ^ 2 -> (2, 1)  (1, 2) ^ 2 -> (3, 0) | 
| 144    (0, 1) ^ 3 -> (3, 2)  (0, 2) ^ 3 -> (3, 1)  (1, 3) ^ 3 -> (2, 0)  (2, 3) ^ 3 
     -> (1, 0) | 155    (0, 1) ^ 3 -> (3, 2)  (0, 2) ^ 3 -> (3, 1)  (1, 3) ^ 3 -> (2, 0)  (2, 3) ^ 3 
     -> (1, 0) | 
| 145 */ | 156 */ | 
| 146 inline int other_two(int one, int two) { | 157 inline int other_two(int one, int two) { | 
| 147     return 1 >> (3 - (one ^ two)) ^ 3; | 158     return 1 >> (3 - (one ^ two)) ^ 3; | 
| 148 } | 159 } | 
| 149 | 160 | 
| 150 #endif | 161 #endif | 
| OLD | NEW | 
|---|