Searched refs:cubic (Results 1 - 25 of 143) sorted by relevance

123456

/external/chromium_org/third_party/skia/experimental/Intersection/
H A DTestUtilities.cpp12 void quad_to_cubic(const Quadratic& quad, Cubic& cubic) { argument
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) { argument
25 if (cubic[minX].x > cubic[inde
42 find_tight_bounds(const Cubic& cubic, _Rect& bounds) argument
59 controls_inside(const Cubic& cubic) argument
[all...]
H A DCubicBounds.cpp16 double leftMostT(const Cubic& cubic, double startT, double endT) { argument
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);
43 void _Rect::setBounds(const Cubic& cubic) { argument
61 setRawBounds(const Cubic& cubic) argument
[all...]
H A DCubicReduceOrder.cpp22 static int coincident_line(const Cubic& cubic, Cubic& reduction) { argument
23 reduction[0] = reduction[1] = cubic[0];
27 static int vertical_line(const Cubic& cubic, ReduceOrder_Styles reduceStyle, Cubic& reduction) { argument
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);
38 double yExtrema = interp_cubic_coords(&cubic[
50 horizontal_line(const Cubic& cubic, ReduceOrder_Styles reduceStyle, Cubic& reduction) argument
74 check_quadratic(const Cubic& cubic, Cubic& reduction) argument
94 check_linear(const Cubic& cubic, ReduceOrder_Styles reduceStyle, int minX, int maxX, int minY, int maxY, Cubic& reduction) argument
158 isLinear(const Cubic& cubic, int startIndex, int endIndex) argument
197 reduceOrder(const Cubic& cubic, Cubic& reduction, ReduceOrder_Quadratics allowQuadratics, ReduceOrder_Styles reduceStyle) argument
[all...]
H A DCubicLineSegments.cpp12 void hodograph(const Cubic& cubic, Quadratic& hodo) { argument
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);
17 hodo[2].x = 3 * (cubic[
22 secondHodograph(const Cubic& cubic, _Line& hodo2) argument
30 subDivisions(const Cubic& cubic) argument
[all...]
H A DCubicToQuadratics_Test.cpp11 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);
28 (void) cubic_to_quadratics(cubic, precision, quads);
30 printf("%s [%d] cubic to quadratics failed count=%d\n", name, (int) index,
40 const Cubic& cubic 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...]
H A DCubicToQuadratics.cpp2 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
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 approximation
57 static double calcTDiv(const Cubic& cubic, doubl argument
80 demote_cubic_to_quad(const Cubic& cubic, Quadratic& quad) argument
93 cubic_to_quadratics(const Cubic& cubic, double precision, SkTDArray<Quadratic>& quadratics) argument
[all...]
H A DCubicParameterization_TestUtility.cpp6 static void parameter_coeffs(const Cubic& cubic, double coeffs[coeff_count]) { argument
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;
26 double ay = cubic[
38 point_on_parameterized_curve(const Cubic& cubic, const _Point& point) argument
[all...]
H A DCubicReduceOrder_Test.cpp48 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
73 order = reduceOrder(cubic, reduce, kReduceOrder_QuadraticsAllowed,
80 const Cubic& cubic = modEpsilonLines[index]; local
81 order = reduceOrder(cubic, reduc
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...]
H A DCubicUtilities.h13 double calcPrecision(const Cubic& cubic);
15 double calcPrecision(const Cubic& cubic, double t, double scale);
20 int cubic_to_quadratics(const Cubic& cubic, double precision,
22 void cubic_to_quadratics(const Cubic& cubic, double precision, SkTDArray<double>& ts);
23 void coefficients(const double* cubic, double& A, double& B, double& C, double& D);
27 void demote_cubic_to_quad(const Cubic& cubic, Quadratic& quad);
31 _Vector dxdy_at_t(const Cubic& cubic, double t);
36 bool rotate(const Cubic& cubic, int zero, int index, Cubic& rotPath);
H A DCubicUtilities_Test.cpp21 const Cubic& cubic = tests[index]; local
22 bool result = clockwise(cubic);
/external/skia/experimental/Intersection/
H A DTestUtilities.cpp12 void quad_to_cubic(const Quadratic& quad, Cubic& cubic) { argument
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) { argument
25 if (cubic[minX].x > cubic[inde
42 find_tight_bounds(const Cubic& cubic, _Rect& bounds) argument
59 controls_inside(const Cubic& cubic) argument
[all...]
H A DCubicBounds.cpp16 double leftMostT(const Cubic& cubic, double startT, double endT) { argument
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);
43 void _Rect::setBounds(const Cubic& cubic) { argument
61 setRawBounds(const Cubic& cubic) argument
[all...]
H A DCubicReduceOrder.cpp22 static int coincident_line(const Cubic& cubic, Cubic& reduction) { argument
23 reduction[0] = reduction[1] = cubic[0];
27 static int vertical_line(const Cubic& cubic, ReduceOrder_Styles reduceStyle, Cubic& reduction) { argument
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);
38 double yExtrema = interp_cubic_coords(&cubic[
50 horizontal_line(const Cubic& cubic, ReduceOrder_Styles reduceStyle, Cubic& reduction) argument
74 check_quadratic(const Cubic& cubic, Cubic& reduction) argument
94 check_linear(const Cubic& cubic, ReduceOrder_Styles reduceStyle, int minX, int maxX, int minY, int maxY, Cubic& reduction) argument
158 isLinear(const Cubic& cubic, int startIndex, int endIndex) argument
197 reduceOrder(const Cubic& cubic, Cubic& reduction, ReduceOrder_Quadratics allowQuadratics, ReduceOrder_Styles reduceStyle) argument
[all...]
H A DCubicLineSegments.cpp12 void hodograph(const Cubic& cubic, Quadratic& hodo) { argument
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);
17 hodo[2].x = 3 * (cubic[
22 secondHodograph(const Cubic& cubic, _Line& hodo2) argument
30 subDivisions(const Cubic& cubic) argument
[all...]
H A DCubicToQuadratics_Test.cpp11 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);
28 (void) cubic_to_quadratics(cubic, precision, quads);
30 printf("%s [%d] cubic to quadratics failed count=%d\n", name, (int) index,
40 const Cubic& cubic 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...]
H A DCubicToQuadratics.cpp2 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
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 approximation
57 static double calcTDiv(const Cubic& cubic, doubl argument
80 demote_cubic_to_quad(const Cubic& cubic, Quadratic& quad) argument
93 cubic_to_quadratics(const Cubic& cubic, double precision, SkTDArray<Quadratic>& quadratics) argument
[all...]
H A DCubicParameterization_TestUtility.cpp6 static void parameter_coeffs(const Cubic& cubic, double coeffs[coeff_count]) { argument
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;
26 double ay = cubic[
38 point_on_parameterized_curve(const Cubic& cubic, const _Point& point) argument
[all...]
/external/chromium_org/third_party/skia/tests/
H A DPathOpsCubicReduceOrderTest.cpp16 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[
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...]
H A DPathOpsDCubicTest.cpp21 const SkDCubic& cubic = tests[index]; local
22 SkASSERT(ValidCubic(cubic));
23 bool result = cubic.clockwise();
H A DPathOpsCubicToQuadsTest.cpp19 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 local
76 const SkDCubic& cubic = cubics[index][idx2]; local
174 const SkDCubic& cubic = locals[x]; local
[all...]
/external/skia/tests/
H A DPathOpsCubicReduceOrderTest.cpp16 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[
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...]
H A DPathOpsDCubicTest.cpp21 const SkDCubic& cubic = tests[index]; local
22 SkASSERT(ValidCubic(cubic));
23 bool result = cubic.clockwise();
H A DPathOpsCubicToQuadsTest.cpp19 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 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/
H A DSkReduceOrder.cpp60 // note that three points in a line doesn't simplify a cubic
109 static int coincident_line(const SkDCubic& cubic, SkDCubic& reduction) { argument
110 reduction[0] = reduction[1] = cubic[0];
118 static int vertical_line(const SkDCubic& cubic, SkDCubic& reduction) { argument
119 reduction[0] = cubic[0];
120 reduction[1] = cubic[3];
124 static int horizontal_line(const SkDCubic& cubic, SkDCubic& reduction) { argument
125 reduction[0] = cubic[0];
126 reduction[1] = cubic[3];
131 static int check_quadratic(const SkDCubic& cubic, SkDCubi argument
157 check_linear(const SkDCubic& cubic, int minX, int maxX, int minY, int maxY, SkDCubic& reduction) argument
203 reduce(const SkDCubic& cubic, Quadratics allowQuadratics) argument
275 SkDCubic cubic; local
[all...]
/external/skia/src/pathops/
H A DSkReduceOrder.cpp60 // note that three points in a line doesn't simplify a cubic
109 static int coincident_line(const SkDCubic& cubic, SkDCubic& reduction) { argument
110 reduction[0] = reduction[1] = cubic[0];
118 static int vertical_line(const SkDCubic& cubic, SkDCubic& reduction) { argument
119 reduction[0] = cubic[0];
120 reduction[1] = cubic[3];
124 static int horizontal_line(const SkDCubic& cubic, SkDCubic& reduction) { argument
125 reduction[0] = cubic[0];
126 reduction[1] = cubic[3];
131 static int check_quadratic(const SkDCubic& cubic, SkDCubi argument
157 check_linear(const SkDCubic& cubic, int minX, int maxX, int minY, int maxY, SkDCubic& reduction) argument
203 reduce(const SkDCubic& cubic, Quadratics allowQuadratics) argument
275 SkDCubic cubic; local
[all...]

Completed in 700 milliseconds

123456