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

Side by Side Diff: experimental/Intersection/QuadraticUtilities.h

Issue 867213004: remove prototype pathops code (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 10 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
OLDNEW
(Empty)
1 /*
2 * Copyright 2012 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #if !defined QUADRATIC_UTILITIES_H
9 #define QUADRATIC_UTILITIES_H
10
11 #include "DataTypes.h"
12
13 int add_valid_ts(double s[], int realRoots, double* t);
14 void chop_at(const Quadratic& src, QuadraticPair& dst, double t);
15 double dx_at_t(const Quadratic& , double t);
16 double dy_at_t(const Quadratic& , double t);
17 //void dxdy_at_t(const Quadratic& , double t, _Point& xy);
18 _Vector dxdy_at_t(const Quadratic& , double t);
19
20 double nearestT(const Quadratic& , const _Point& );
21 bool point_in_hull(const Quadratic& , const _Point& );
22
23 /* Parameterization form, given A*t*t + 2*B*t*(1-t) + C*(1-t)*(1-t)
24 *
25 * a = A - 2*B + C
26 * b = 2*B - 2*C
27 * c = C
28 */
29 inline void set_abc(const double* quad, double& a, double& b, double& c) {
30 a = quad[0]; // a = A
31 b = 2 * quad[2]; // b = 2*B
32 c = quad[4]; // c = C
33 b -= c; // b = 2*B - C
34 a -= b; // a = A - 2*B + C
35 b -= c; // b = 2*B - 2*C
36 }
37
38 int quadraticRootsReal(double A, double B, double C, double t[2]);
39 int quadraticRootsValidT(const double A, const double B, const double C, double s[2]);
40 void sub_divide(const Quadratic& src, double t1, double t2, Quadratic& dst);
41 _Point sub_divide(const Quadratic& src, const _Point& a, const _Point& c, double t1, double t2);
42 void toCubic(const Quadratic& , Cubic& );
43 _Point top(const Quadratic& , double startT, double endT);
44 void xy_at_t(const Quadratic& , double t, double& x, double& y);
45 _Point xy_at_t(const Quadratic& , double t);
46
47 #endif
OLDNEW
« no previous file with comments | « experimental/Intersection/QuadraticSubDivide.cpp ('k') | experimental/Intersection/QuadraticUtilities.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698