| 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 #ifndef SkPathOpsLine_DEFINED | 7 #ifndef SkPathOpsLine_DEFINED |
| 8 #define SkPathOpsLine_DEFINED | 8 #define SkPathOpsLine_DEFINED |
| 9 | 9 |
| 10 #include "SkPathOpsPoint.h" | 10 #include "SkPathOpsPoint.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 SkDLine line; | 24 SkDLine line; |
| 25 line.set(a); | 25 line.set(a); |
| 26 return line.subDivide(t1, t2); | 26 return line.subDivide(t1, t2); |
| 27 } | 27 } |
| 28 | 28 |
| 29 double exactPoint(const SkDPoint& xy) const; | 29 double exactPoint(const SkDPoint& xy) const; |
| 30 static double ExactPointH(const SkDPoint& xy, double left, double right, dou
ble y); | 30 static double ExactPointH(const SkDPoint& xy, double left, double right, dou
ble y); |
| 31 static double ExactPointV(const SkDPoint& xy, double top, double bottom, dou
ble x); | 31 static double ExactPointV(const SkDPoint& xy, double top, double bottom, dou
ble x); |
| 32 double isLeft(const SkDPoint& pt) const; | 32 double isLeft(const SkDPoint& pt) const; |
| 33 double nearPoint(const SkDPoint& xy) const; | 33 double nearPoint(const SkDPoint& xy) const; |
| 34 bool nearRay(const SkDPoint& xy) const; |
| 34 static double NearPointH(const SkDPoint& xy, double left, double right, doub
le y); | 35 static double NearPointH(const SkDPoint& xy, double left, double right, doub
le y); |
| 35 static double NearPointV(const SkDPoint& xy, double top, double bottom, doub
le x); | 36 static double NearPointV(const SkDPoint& xy, double top, double bottom, doub
le x); |
| 37 static bool NearRay(double dx1, double dy1, double dx2, double dy2); |
| 36 SkDPoint ptAtT(double t) const; | 38 SkDPoint ptAtT(double t) const; |
| 37 SkDLine subDivide(double t1, double t2) const; | 39 SkDLine subDivide(double t1, double t2) const; |
| 40 |
| 41 #ifdef SK_DEBUG |
| 42 void dump(); |
| 43 #endif |
| 38 private: | 44 private: |
| 39 SkDVector tangent() const { return fPts[0] - fPts[1]; } | 45 SkDVector tangent() const { return fPts[0] - fPts[1]; } |
| 40 }; | 46 }; |
| 41 | 47 |
| 42 #endif | 48 #endif |
| OLD | NEW |