Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(422)

Side by Side Diff: src/pathops/SkPathOpsCurve.h

Issue 2321973005: Rewriting path writer (Closed)
Patch Set: revert unneeded test changes Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/pathops/SkPathOpsCommon.cpp ('k') | src/pathops/SkPathOpsCurve.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/pathops/SkPathOpsCommon.cpp ('k') | src/pathops/SkPathOpsCurve.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698