8dcf114db9
M Intersection/DataTypes.cpp M Intersection/QuadraticIntersection_Test.cpp M Intersection/EdgeWalker.cpp M Intersection/LineQuadraticIntersection_Test.cpp M Intersection/LineIntersection_Test.cpp M Intersection/LineIntersection.cpp D Intersection/edge.xcodeproj M Intersection/SimplifyFindTop_Test.cpp M Intersection/DataTypes.h A Intersection/SimplifyRect4x4_Test.cpp M Intersection/CubicIntersection_Test.cpp M Intersection/QuadraticUtilities.h M Intersection/LineCubicIntersection_Test.cpp A Intersection/CurveUtilities.h M Intersection/QuadraticBezierClip.cpp M Intersection/QuadraticBounds.cpp M Intersection/LineUtilities.h M Intersection/Intersection_Tests.cpp M Intersection/Simplify.cpp M Intersection/EdgeWalker_TestUtility.cpp M Intersection/QuadraticUtilities.cpp M Intersection/thingsToDo.txt M Intersection/LineUtilities.cpp M Intersection/CubicUtilities.h M Intersection/SimplifyFindNext_Test.cpp M Intersection/Intersection_Tests.h M Intersection/CubicBezierClip.cpp M Intersection/ActiveEdge_Test.cpp M Intersection/CubicBounds.cpp M Intersection/Simplify.h M Intersection/SimplifyNew_Test.cpp M Intersection/EdgeWalker_Test.h M Intersection/CubicUtilities.cpp M Intersection/op.htm M Intersection/ConvexHull.cpp D Intersection/RectUtilities.cpp M Intersection/SimplifyAddIntersectingTs_Test.cpp git-svn-id: http://skia.googlecode.com/svn/trunk@4429 2bbb7eff-a529-9590-31e7-b0007b416f81
23 lines
671 B
C
23 lines
671 B
C
#include "DataTypes.h"
|
|
|
|
void dxdy_at_t(const Quadratic& , double t, double& x, double& y);
|
|
|
|
/* Parameterization form, given A*t*t + 2*B*t*(1-t) + C*(1-t)*(1-t)
|
|
*
|
|
* a = A - 2*B + C
|
|
* b = 2*B - 2*C
|
|
* c = C
|
|
*/
|
|
inline void set_abc(const double* quad, double& a, double& b, double& c) {
|
|
a = quad[0]; // a = A
|
|
b = 2 * quad[2]; // b = 2*B
|
|
c = quad[4]; // c = C
|
|
b -= c; // b = 2*B - C
|
|
a -= b; // a = A - 2*B + C
|
|
b -= c; // b = 2*B - 2*C
|
|
}
|
|
|
|
int quadraticRoots(double A, double B, double C, double t[2]);
|
|
|
|
void xy_at_t(const Quadratic& , double t, double& x, double& y);
|