/external/chromium_org/third_party/skia/experimental/Intersection/ |
TestUtilities.cpp | 12 void quad_to_cubic(const Quadratic& quad, Cubic& cubic) { 13 cubic[0] = quad[0]; 14 cubic[1].x = quad[0].x / 3 + quad[1].x * 2 / 3; 15 cubic[1].y = quad[0].y / 3 + quad[1].y * 2 / 3; 16 cubic[2].x = quad[2].x / 3 + quad[1].x * 2 / 3; 17 cubic[2].y = quad[2].y / 3 + quad[1].y * 2 / 3; 18 cubic[3] = quad[2]; 21 static bool tiny(const Cubic& cubic) { [all...] |
CubicBounds.cpp | 16 double leftMostT(const Cubic& cubic, double startT, double endT) { 19 int results = findExtrema(cubic[0].x, cubic[1].x, cubic[2].x, cubic[3].x, leftTs); 29 xy_at_t(cubic, leftTs[0], pt[0].x, pt[0].y); 30 xy_at_t(cubic, leftTs[1], pt[1].x, pt[1].y); 38 xy_at_t(cubic, startT, pt[0].x, pt[0].y); 39 xy_at_t(cubic, endT, pt[1].x, pt[1].y) [all...] |
CubicReduceOrder.cpp | 22 static int coincident_line(const Cubic& cubic, Cubic& reduction) { 23 reduction[0] = reduction[1] = cubic[0]; 27 static int vertical_line(const Cubic& cubic, ReduceOrder_Styles reduceStyle, Cubic& reduction) { 29 reduction[0] = cubic[0]; 30 reduction[1] = cubic[3]; 36 int roots = findExtrema(cubic[0].y, cubic[1].y, cubic[2].y, cubic[3].y, tValues) [all...] |
CubicLineSegments.cpp | 12 void hodograph(const Cubic& cubic, Quadratic& hodo) { 13 hodo[0].x = 3 * (cubic[1].x - cubic[0].x); 14 hodo[0].y = 3 * (cubic[1].y - cubic[0].y); 15 hodo[1].x = 3 * (cubic[2].x - cubic[1].x); 16 hodo[1].y = 3 * (cubic[2].y - cubic[1].y) [all...] |
CubicToQuadratics_Test.cpp | 8 static void test(const Cubic* cubics, const char* name, int firstTest, size_t testCount) { 11 const Cubic& cubic = cubics[index]; local 12 double precision = calcPrecision(cubic); 13 (void) cubic_to_quadratics(cubic, precision, quads); 15 printf("%s [%d] cubic to quadratics failed count=%d\n", name, (int) index, 25 Cubic cubic; local 26 quad_to_cubic(quad, cubic); 27 double precision = calcPrecision(cubic); 40 const Cubic& cubic = cubics[index]; local 63 const Cubic& cubic = cubics[index][idx2]; local 159 const Cubic& cubic = locals[x]; local 193 Cubic cubic; local 233 const Cubic& cubic = samples[x][y]; local [all...] |
CubicToQuadratics.cpp | 2 http://stackoverflow.com/questions/2009160/how-do-i-convert-the-2-control-points-of-a-cubic-curve-to-the-single-control-poi 6 Let's call the control points of the cubic Q0..Q3 and the control points of the quadratic P0..P2. 18 If this is a degree-elevated cubic, then both equations will give the same answer for P1. Since 24 Cubic defined by: P1/2 - anchor points, C1/C2 control points 26 mid-point approx of cubic: a quad that shares the same anchors with the cubic and has the 32 Compute the Tdiv as the root of (cubic) equation 34 if Tdiv < 0.5 divide the cubic at Tdiv. First segment [0..Tdiv] can be approximated with by a 37 0.5<=Tdiv<1 - simply divide the cubic in two. The two halves can be approximated by the mid-point 39 Tdiv>=1 - the entire cubic can be approximated by the mid-point approximatio [all...] |
CubicParameterization_TestUtility.cpp | 6 static void parameter_coeffs(const Cubic& cubic, double coeffs[coeff_count]) { 10 alt_set_abcd(&cubic[0].x, ax, bx, cx, dx); 12 set_abcd(&cubic[0].x, ax, bx, cx, dx); 15 alt_set_abcd(&cubic[0].y, ay, by, cy, dy); 17 set_abcd(&cubic[0].y, ay, by, cy, dy); 22 double ax = cubic[0].x; 23 double bx = cubic[1].x; 24 double cx = cubic[2].x; 25 double dx = cubic[3].x [all...] |
CubicReduceOrder_Test.cpp | 15 Cubic reduce; 48 const Cubic& cubic = pointDegenerates[index]; local 49 order = reduceOrder(cubic, reduce, kReduceOrder_QuadraticsAllowed, 56 const Cubic& cubic = notPointDegenerates[index]; local 57 order = reduceOrder(cubic, reduce, kReduceOrder_QuadraticsAllowed, 64 const Cubic& cubic = lines[index]; local 65 order = reduceOrder(cubic, reduce, kReduceOrder_QuadraticsAllowed 72 const Cubic& cubic = notLines[index]; local 80 const Cubic& cubic = modEpsilonLines[index]; local 88 const Cubic& cubic = lessEpsilonLines[index]; local 96 const Cubic& cubic = negEpsilonLines[index]; local 105 Cubic cubic; local 115 Cubic cubic; local 126 const Cubic& cubic = lines[index]; local [all...] |
CubicUtilities.h | 13 double calcPrecision(const Cubic& cubic); 15 double calcPrecision(const Cubic& cubic, double t, double scale); 17 void chop_at(const Cubic& src, CubicPair& dst, double t); 18 bool clockwise(const Cubic& c); 20 int cubic_to_quadratics(const Cubic& cubic, double precision, 22 void cubic_to_quadratics(const Cubic& cubic, double precision, SkTDArray<double>& ts) [all...] |
CubicUtilities_Test.cpp | 10 const Cubic tests[] = { 21 const Cubic& cubic = tests[index]; local 22 bool result = clockwise(cubic);
|
/external/skia/experimental/Intersection/ |
TestUtilities.cpp | 12 void quad_to_cubic(const Quadratic& quad, Cubic& cubic) { 13 cubic[0] = quad[0]; 14 cubic[1].x = quad[0].x / 3 + quad[1].x * 2 / 3; 15 cubic[1].y = quad[0].y / 3 + quad[1].y * 2 / 3; 16 cubic[2].x = quad[2].x / 3 + quad[1].x * 2 / 3; 17 cubic[2].y = quad[2].y / 3 + quad[1].y * 2 / 3; 18 cubic[3] = quad[2]; 21 static bool tiny(const Cubic& cubic) { [all...] |
CubicBounds.cpp | 16 double leftMostT(const Cubic& cubic, double startT, double endT) { 19 int results = findExtrema(cubic[0].x, cubic[1].x, cubic[2].x, cubic[3].x, leftTs); 29 xy_at_t(cubic, leftTs[0], pt[0].x, pt[0].y); 30 xy_at_t(cubic, leftTs[1], pt[1].x, pt[1].y); 38 xy_at_t(cubic, startT, pt[0].x, pt[0].y); 39 xy_at_t(cubic, endT, pt[1].x, pt[1].y) [all...] |
CubicReduceOrder.cpp | 22 static int coincident_line(const Cubic& cubic, Cubic& reduction) { 23 reduction[0] = reduction[1] = cubic[0]; 27 static int vertical_line(const Cubic& cubic, ReduceOrder_Styles reduceStyle, Cubic& reduction) { 29 reduction[0] = cubic[0]; 30 reduction[1] = cubic[3]; 36 int roots = findExtrema(cubic[0].y, cubic[1].y, cubic[2].y, cubic[3].y, tValues) [all...] |
CubicLineSegments.cpp | 12 void hodograph(const Cubic& cubic, Quadratic& hodo) { 13 hodo[0].x = 3 * (cubic[1].x - cubic[0].x); 14 hodo[0].y = 3 * (cubic[1].y - cubic[0].y); 15 hodo[1].x = 3 * (cubic[2].x - cubic[1].x); 16 hodo[1].y = 3 * (cubic[2].y - cubic[1].y) [all...] |
CubicToQuadratics_Test.cpp | 8 static void test(const Cubic* cubics, const char* name, int firstTest, size_t testCount) { 11 const Cubic& cubic = cubics[index]; local 12 double precision = calcPrecision(cubic); 13 (void) cubic_to_quadratics(cubic, precision, quads); 15 printf("%s [%d] cubic to quadratics failed count=%d\n", name, (int) index, 25 Cubic cubic; local 26 quad_to_cubic(quad, cubic); 27 double precision = calcPrecision(cubic); 40 const Cubic& cubic = cubics[index]; local 63 const Cubic& cubic = cubics[index][idx2]; local 159 const Cubic& cubic = locals[x]; local 193 Cubic cubic; local 233 const Cubic& cubic = samples[x][y]; local [all...] |
CubicToQuadratics.cpp | 2 http://stackoverflow.com/questions/2009160/how-do-i-convert-the-2-control-points-of-a-cubic-curve-to-the-single-control-poi 6 Let's call the control points of the cubic Q0..Q3 and the control points of the quadratic P0..P2. 18 If this is a degree-elevated cubic, then both equations will give the same answer for P1. Since 24 Cubic defined by: P1/2 - anchor points, C1/C2 control points 26 mid-point approx of cubic: a quad that shares the same anchors with the cubic and has the 32 Compute the Tdiv as the root of (cubic) equation 34 if Tdiv < 0.5 divide the cubic at Tdiv. First segment [0..Tdiv] can be approximated with by a 37 0.5<=Tdiv<1 - simply divide the cubic in two. The two halves can be approximated by the mid-point 39 Tdiv>=1 - the entire cubic can be approximated by the mid-point approximatio [all...] |
CubicParameterization_TestUtility.cpp | 6 static void parameter_coeffs(const Cubic& cubic, double coeffs[coeff_count]) { 10 alt_set_abcd(&cubic[0].x, ax, bx, cx, dx); 12 set_abcd(&cubic[0].x, ax, bx, cx, dx); 15 alt_set_abcd(&cubic[0].y, ay, by, cy, dy); 17 set_abcd(&cubic[0].y, ay, by, cy, dy); 22 double ax = cubic[0].x; 23 double bx = cubic[1].x; 24 double cx = cubic[2].x; 25 double dx = cubic[3].x [all...] |
/external/chromium_org/third_party/skia/tests/ |
PathOpsCubicReduceOrderTest.cpp | 16 static bool controls_inside(const SkDCubic& cubic) { 17 return between(cubic[0].fX, cubic[1].fX, cubic[3].fX) 18 && between(cubic[0].fX, cubic[2].fX, cubic[3].fX) 19 && between(cubic[0].fY, cubic[1].fY, cubic[3].fY 108 const SkDCubic& cubic = pointDegenerates[index]; local 117 const SkDCubic& cubic = notPointDegenerates[index]; local 127 const SkDCubic& cubic = lines[index]; local 136 const SkDCubic& cubic = notLines[index]; local 145 const SkDCubic& cubic = modEpsilonLines[index]; local 154 const SkDCubic& cubic = lessEpsilonLines[index]; local 164 const SkDCubic& cubic = negEpsilonLines[index]; local 175 SkDCubic cubic = quad.toCubic(); local 185 SkDCubic cubic = quad.toCubic(); local 195 SkDCubic cubic = quad.toCubic(); local [all...] |
PathOpsDCubicTest.cpp | 21 const SkDCubic& cubic = tests[index]; local 22 SkASSERT(ValidCubic(cubic)); 23 bool result = cubic.clockwise();
|
PathOpsCubicToQuadsTest.cpp | 19 const SkDCubic& cubic = cubics[index]; local 20 SkASSERT(ValidCubic(cubic)); 21 double precision = cubic.calcPrecision(); 23 CubicToQuads(cubic, precision, quads); 25 SkDebugf("%s [%d] cubic to quadratics failed count=%d\n", name, static_cast<int>(index), 37 SkDCubic cubic = quad.toCubic(); local 38 double precision = cubic.calcPrecision(); 40 CubicToQuads(cubic, precision, quads); 42 SkDebugf("%s [%d] cubic to quadratics failed count=%d\n", name, static_cast<int>(index), 53 const SkDCubic& cubic = cubics[index] local 76 const SkDCubic& cubic = cubics[index][idx2]; local 174 const SkDCubic& cubic = locals[x]; local [all...] |
/external/skia/tests/ |
PathOpsCubicReduceOrderTest.cpp | 16 static bool controls_inside(const SkDCubic& cubic) { 17 return between(cubic[0].fX, cubic[1].fX, cubic[3].fX) 18 && between(cubic[0].fX, cubic[2].fX, cubic[3].fX) 19 && between(cubic[0].fY, cubic[1].fY, cubic[3].fY 108 const SkDCubic& cubic = pointDegenerates[index]; local 117 const SkDCubic& cubic = notPointDegenerates[index]; local 127 const SkDCubic& cubic = lines[index]; local 136 const SkDCubic& cubic = notLines[index]; local 145 const SkDCubic& cubic = modEpsilonLines[index]; local 154 const SkDCubic& cubic = lessEpsilonLines[index]; local 164 const SkDCubic& cubic = negEpsilonLines[index]; local 175 SkDCubic cubic = quad.toCubic(); local 185 SkDCubic cubic = quad.toCubic(); local 195 SkDCubic cubic = quad.toCubic(); local [all...] |
PathOpsDCubicTest.cpp | 21 const SkDCubic& cubic = tests[index]; local 22 SkASSERT(ValidCubic(cubic)); 23 bool result = cubic.clockwise();
|
PathOpsCubicToQuadsTest.cpp | 19 const SkDCubic& cubic = cubics[index]; local 20 SkASSERT(ValidCubic(cubic)); 21 double precision = cubic.calcPrecision(); 23 CubicToQuads(cubic, precision, quads); 25 SkDebugf("%s [%d] cubic to quadratics failed count=%d\n", name, static_cast<int>(index), 37 SkDCubic cubic = quad.toCubic(); local 38 double precision = cubic.calcPrecision(); 40 CubicToQuads(cubic, precision, quads); 42 SkDebugf("%s [%d] cubic to quadratics failed count=%d\n", name, static_cast<int>(index), 53 const SkDCubic& cubic = cubics[index] local 76 const SkDCubic& cubic = cubics[index][idx2]; local 174 const SkDCubic& cubic = locals[x]; local [all...] |
/external/chromium_org/third_party/skia/src/pathops/ |
SkReduceOrder.cpp | 60 // note that three points in a line doesn't simplify a cubic 109 static int coincident_line(const SkDCubic& cubic, SkDCubic& reduction) { 110 reduction[0] = reduction[1] = cubic[0]; 118 static int vertical_line(const SkDCubic& cubic, SkDCubic& reduction) { 119 reduction[0] = cubic[0]; 120 reduction[1] = cubic[3]; 124 static int horizontal_line(const SkDCubic& cubic, SkDCubic& reduction) { 125 reduction[0] = cubic[0]; 126 reduction[1] = cubic[3]; 131 static int check_quadratic(const SkDCubic& cubic, SkDCubic& reduction) 275 SkDCubic cubic; local [all...] |
/external/skia/src/pathops/ |
SkReduceOrder.cpp | 60 // note that three points in a line doesn't simplify a cubic 109 static int coincident_line(const SkDCubic& cubic, SkDCubic& reduction) { 110 reduction[0] = reduction[1] = cubic[0]; 118 static int vertical_line(const SkDCubic& cubic, SkDCubic& reduction) { 119 reduction[0] = cubic[0]; 120 reduction[1] = cubic[3]; 124 static int horizontal_line(const SkDCubic& cubic, SkDCubic& reduction) { 125 reduction[0] = cubic[0]; 126 reduction[1] = cubic[3]; 131 static int check_quadratic(const SkDCubic& cubic, SkDCubic& reduction) 275 SkDCubic cubic; local [all...] |