| 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 SkPathOpsCurve_DEFINE | 7 #ifndef SkPathOpsCurve_DEFINE |
| 8 #define SkPathOpsCurve_DEFINE | 8 #define SkPathOpsCurve_DEFINE |
| 9 | 9 |
| 10 #include "SkIntersections.h" | 10 #include "SkIntersections.h" |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 SkDPoint quadTop(const SkPoint curve[3], SkScalar , double s, double e, doub
le* topT); | 75 SkDPoint quadTop(const SkPoint curve[3], SkScalar , double s, double e, doub
le* topT); |
| 76 | 76 |
| 77 void setConicBounds(const SkPoint curve[3], SkScalar curveWeight, | 77 void setConicBounds(const SkPoint curve[3], SkScalar curveWeight, |
| 78 double s, double e, SkPathOpsBounds* ); | 78 double s, double e, SkPathOpsBounds* ); |
| 79 void setCubicBounds(const SkPoint curve[4], SkScalar , | 79 void setCubicBounds(const SkPoint curve[4], SkScalar , |
| 80 double s, double e, SkPathOpsBounds* ); | 80 double s, double e, SkPathOpsBounds* ); |
| 81 void setQuadBounds(const SkPoint curve[3], SkScalar , | 81 void setQuadBounds(const SkPoint curve[3], SkScalar , |
| 82 double s, double e, SkPathOpsBounds*); | 82 double s, double e, SkPathOpsBounds*); |
| 83 }; | 83 }; |
| 84 | 84 |
| 85 class SkDCurveSweep { |
| 86 public: |
| 87 bool isCurve() const { return fIsCurve; } |
| 88 bool isOrdered() const { return fOrdered; } |
| 89 void setCurveHullSweep(SkPath::Verb verb); |
| 90 |
| 91 SkDCurve fCurve; |
| 92 SkDVector fSweep[2]; |
| 93 private: |
| 94 bool fIsCurve; |
| 95 bool fOrdered; // cleared when a cubic's control point isn't between the sw
eep vectors |
| 96 |
| 97 }; |
| 85 | 98 |
| 86 extern SkDPoint (SkDCurve::* const Top[])(const SkPoint curve[], SkScalar cWeigh
t, | 99 extern SkDPoint (SkDCurve::* const Top[])(const SkPoint curve[], SkScalar cWeigh
t, |
| 87 double tStart, double tEnd, double* topT); | 100 double tStart, double tEnd, double* topT); |
| 88 | 101 |
| 89 static SkDPoint dline_xy_at_t(const SkPoint a[2], SkScalar , double t) { | 102 static SkDPoint dline_xy_at_t(const SkPoint a[2], SkScalar , double t) { |
| 90 SkDLine line; | 103 SkDLine line; |
| 91 line.set(a); | 104 line.set(a); |
| 92 return line.ptAtT(t); | 105 return line.ptAtT(t); |
| 93 } | 106 } |
| 94 | 107 |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 line_intercept_v, | 406 line_intercept_v, |
| 394 quad_intercept_h, | 407 quad_intercept_h, |
| 395 quad_intercept_v, | 408 quad_intercept_v, |
| 396 conic_intercept_h, | 409 conic_intercept_h, |
| 397 conic_intercept_v, | 410 conic_intercept_v, |
| 398 cubic_intercept_h, | 411 cubic_intercept_h, |
| 399 cubic_intercept_v, | 412 cubic_intercept_v, |
| 400 }; | 413 }; |
| 401 | 414 |
| 402 #endif | 415 #endif |
| OLD | NEW |