Searched defs:cubic (Results 1 - 25 of 29) sorted by relevance

12

/external/skia/tests/
H A DPathOpsDCubicTest.cpp19 const SkDCubic& cubic = hullTests[index]; local
21 cubic.convexHull(order);
H A DPathOpsDRectTest.cpp37 static void setRawBounds(const SkDCubic& cubic, SkDRect* rect) { argument
38 rect->set(cubic[0]);
39 rect->add(cubic[1]);
40 rect->add(cubic[2]);
41 rect->add(cubic[3]);
60 const SkDCubic& cubic = cubicTests[index]; local
61 SkASSERT(ValidCubic(cubic));
62 setRawBounds(cubic, &rect);
63 rect2.setBounds(cubic);
H A DPathOpsLineParametetersTest.cpp43 const SkDCubic& cubic = tests[index]; local
44 SkASSERT(ValidCubic(cubic));
45 lineParameters.cubicEndPoints(cubic, 0, 3);
47 denormalizedDistance[0] = lineParameters.controlPtDistance(cubic, 1);
48 denormalizedDistance[1] = lineParameters.controlPtDistance(cubic, 2);
67 normalizedDistance[0] = lineParameters.controlPtDistance(cubic, 1);
68 normalizedDistance[1] = lineParameters.controlPtDistance(cubic, 2);
H A DPathOpsCubicQuadIntersectionTest.cpp16 SkDCubic cubic; member in struct:quadCubic
56 const SkDCubic& cubic = quadCubicTests[index].cubic; local
57 SkASSERT(ValidCubic(cubic));
62 int order1 = reduce1.reduce(cubic, SkReduceOrder::kNo_Quadratics);
65 SkDebugf("[%d] cubic order=%d\n", iIndex, order1);
73 int roots = i.intersect(cubic, quad);
76 SkDPoint xy1 = cubic.ptAtT(tt1);
H A DGeometryTest.cpp122 const SkPoint cubic[] = { local
126 REPORTER_ASSERT(reporter, nearly_equal(cubic[i], dst[i]));
H A DPathOpsCubicLineIntersectionTest.cpp15 SkDCubic cubic; member in struct:lineCubic
28 const SkDCubic& cubic = failLineCubicTests[iIndex].cubic; local
29 SkASSERT(ValidCubic(cubic));
34 int order1 = reduce1.reduce(cubic, SkReduceOrder::kNo_Quadratics);
37 SkDebugf("[%d] cubic order=%d\n", iIndex, order1);
46 int roots = i.intersect(cubic, line);
99 static int doIntersect(SkIntersections& intersections, const SkDCubic& cubic, const SkDLine& line) { argument
109 result = intersections.vertical(cubic, top, bottom, line[0].fX, flipped);
117 result = intersections.horizontal(cubic, lef
126 const SkDCubic& cubic = lineCubicTests[iIndex].cubic; local
193 const SkDCubic& cubic = lineCubicTests[iIndex].cubic; local
[all...]
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.debugToCubic(); local
185 SkDCubic cubic = quad.debugToCubic(); local
195 SkDCubic cubic = quad.debugToCubic(); local
[all...]
H A DStrokerTest.cpp187 SkDebugf("\n%s tan=%d cubic=%d width=%1.9g\n", __FUNCTION__, gMaxRecursion[0],
203 SkDebugf("\n%s max tan=%d cubic=%d\n", __FUNCTION__, bestTan, bestCubic);
271 SkPoint cubic[4]; local
272 cubic[0].fX = r.nextRangeF(0, 500);
273 cubic[0].fY = r.nextRangeF(0, 500);
276 cubic[1].fX = r.nextRangeF(0, 500);
277 cubic[1].fY = r.nextRangeF(0, 500);
278 } while (cubic[0].distanceToSqd(cubic[1]) < halfSquared);
280 cubic[
[all...]
H A DPathOpsCubicLineIntersectionIdeas.cpp54 static double binary_search(const SkDCubic& cubic, double step, const SkDPoint& pt, double t, argument
59 SkDPoint cubicAtT = cubic.ptAtT(t);
67 SkDebugf("binary search failed: step=%1.9g cubic=", firstStep);
68 cubic.dump();
76 SkDPoint lessPt = cubic.ptAtT(t - lastStep);
85 SkDPoint morePt = cubic.ptAtT(t + lastStep);
148 SkDCubic cubic = {{origin, local
155 SkDPoint pt = cubic.ptAtT(t);
157 // see if the line / cubic has a fun range of roots
159 SkDCubic::Coefficients(&cubic[
[all...]
H A DPathOpsTestCommon.cpp16 static double calc_t_div(const SkDCubic& cubic, double precision, double start) { argument
21 cPtr = &cubic;
24 sub = cubic.subDivide(start, 1);
39 static bool add_simple_ts(const SkDCubic& cubic, double precision, SkTArray<double, true>* ts) { argument
40 double tDiv = calc_t_div(cubic, precision, 0);
51 static void addTs(const SkDCubic& cubic, double precision, double start, double end, argument
53 double tDiv = calc_t_div(cubic, precision, 0);
63 static void toQuadraticTs(const SkDCubic* cubic, double precision, SkTArray<double, true>* ts) { argument
65 int order = reducer.reduce(*cubic, SkReduceOrder::kAllow_Quadratics);
70 int inflections = cubic
133 CubicToQuads(const SkDCubic& cubic, double precision, SkTArray<SkDQuad, true>& quads) argument
165 SkDCubic cubic; local
205 SkDCubic cubic; local
280 ValidCubic(const SkDCubic& cubic) argument
[all...]
H A DPathOpsCubicIntersectionTest.cpp620 const SkDCubic& cubic = selfSet[index]; local
623 c[i] = cubic[i].asSkPoint();
/external/skia/src/pathops/
H A DSkPathOpsTSect.cpp31 int SkIntersections::intersect(const SkDCubic& cubic, const SkDQuad& quad) { argument
32 SkTSect<SkDCubic, SkDQuad> sect1(cubic PATH_OPS_DEBUG_T_SECT_PARAMS(1));
38 int SkIntersections::intersect(const SkDCubic& cubic, const SkDConic& conic) { argument
39 SkTSect<SkDCubic, SkDConic> sect1(cubic PATH_OPS_DEBUG_T_SECT_PARAMS(1));
H A DSkOpCubicHull.cpp9 static bool rotate(const SkDCubic& cubic, int zero, int index, SkDCubic& rotPath) { argument
10 double dy = cubic[index].fY - cubic[zero].fY;
11 double dx = cubic[index].fX - cubic[zero].fX;
16 rotPath = cubic;
18 rotPath[index].fY = cubic[zero].fY;
22 if (approximately_equal(cubic[side1].fY, cubic[zero].fY)) {
23 rotPath[side1].fY = cubic[zer
[all...]
H A DSkPathOpsConic.cpp72 bool SkDConic::hullIntersects(const SkDCubic& cubic, bool* isLinear) const { argument
73 return cubic.hullIntersects(*this, isLinear);
H A DSkPathOpsCubic.h60 static void Coefficients(const double* cubic, double* A, double* B, double* C, double* D);
77 SkDCubic cubic; local
78 return cubic.set(a).findInflections(tValues);
98 * Return the number of valid roots (0 < root < 1) for this cubic intersecting the
103 * Return the number of valid roots (0 < root < 1) for this cubic intersecting the
119 SkDCubic cubic; local
120 return cubic.set(a).subDivide(t1, t2);
127 SkDCubic cubic; local
128 cubic.set(pts).subDivide(a, d, t1, t2, p);
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
288 SkDCubic cubic; local
[all...]
H A DSkDCubicLineIntersection.cpp12 Find the interection of a line and cubic by solving for valid t values.
14 Analogous to line-quadratic intersection, solve line-cubic intersection by
15 representing the cubic as:
23 Then using Mathematica, solve for the values of t where the cubic intersects the
53 instead, use Numeric Solutions recipe to solve the cubic.
213 // check if midway on cubic is also same point. If so, discard this
280 /* Note that this does not look for endpoints of the line that are near the cubic.
319 // FIXME: see if line end is nearly on cubic
345 // FIXME: see if line end is nearly on cubic
400 int SkIntersections::horizontal(const SkDCubic& cubic, doubl argument
407 vertical(const SkDCubic& cubic, double top, double bottom, double x, bool flipped) argument
414 intersect(const SkDCubic& cubic, const SkDLine& line) argument
420 intersectRay(const SkDCubic& cubic, const SkDLine& line) argument
[all...]
H A DSkIntersections.h80 SkDCubic cubic; local
81 cubic.set(a);
83 return horizontal(cubic, left, right, y, flipped);
87 SkDCubic cubic; local
88 cubic.set(a);
90 return vertical(cubic, top, bottom, x, flipped);
94 SkDCubic cubic; local
95 cubic.set(a);
99 return intersect(cubic, line);
H A DSkPathOpsCurve.h38 void set(const SkDCubic& cubic) { argument
40 fPts[index] = cubic[index].asSkPoint();
105 SkDCubic cubic; local
106 cubic.set(a);
107 return cubic.ptAtT(t);
161 SkDCubic cubic; local
162 cubic.set(a);
163 return cubic.dxdyAtT(t);
220 SkDCubic cubic; local
221 cubic
258 SkDCubic cubic; local
305 SkDCubic cubic; local
310 SkDCubic cubic; local
[all...]
H A DSkPathOpsQuad.cpp18 /* if returning true, check contains true if quad's hull collapsed, making the cubic linear
55 bool SkDQuad::hullIntersects(const SkDCubic& cubic, bool* isLinear) const { argument
56 return cubic.hullIntersects(*this, isLinear);
H A DSkPathOpsCubic.cpp146 // a pair of one cubic's points. If the 2nd cubic's points
147 // are on the line or on the opposite side from the 1st cubic's 'odd man', the
149 /* if returning true, check contains true if cubic's hull collapsed, making the cubic linear
150 if returning false, check contains true if the the cubic pair have only the end point in common
253 SkDCubic cubic; local
254 cubic.set(pointsPtr);
256 int infTCount = cubic.findInflections(inflectionTs);
259 int roots = cubic
[all...]
H A DSkPathOpsDebug.cpp28 const char* SkPathOpsDebug::kLVerbStr[] = {"", "line", "quad", "cubic"};
142 SkDCubic cubic; local
143 cubic[0] = fPts[0];
144 cubic[2] = fPts[1];
145 cubic[3] = fPts[2];
146 cubic[1].fX = (cubic[0].fX + cubic[2].fX * 2) / 3;
147 cubic[1].fY = (cubic[
[all...]
/external/skia/src/pdf/
H A DSkPDFUtils.cpp98 SkPoint cubic[4]; local
99 SkConvertQuadToCubic(quad, cubic);
100 SkPDFUtils::AppendCubic(cubic[1].fX, cubic[1].fY, cubic[2].fX, cubic[2].fY,
101 cubic[3].fX, cubic[3].fY, content);
/external/skia/src/utils/win/
H A DSkDWriteGeometrySink.cpp90 static bool check_quadratic(const Cubic& cubic, Quadratic& reduction) { argument
91 float dx10 = cubic[1].x - cubic[0].x;
92 float dx23 = cubic[2].x - cubic[3].x;
93 float midX = cubic[0].x + dx10 * 3 / 2;
94 //NOTE: !approximately_equal(midX - cubic[3].x, dx23 * 3 / 2)
96 if (!approximately_equal(midX, (dx23 * 3 / 2) + cubic[3].x)) {
99 float dy10 = cubic[1].y - cubic[
118 Cubic cubic = { { prevPt.x, prevPt.y }, local
[all...]
/external/skia/samplecode/
H A DSamplePatch.cpp70 static void eval_patch_edge(const SkPoint cubic[], SkPoint samples[], int segs) { argument
74 samples[0] = cubic[0];
77 SkEvalCubicAt(cubic, t, &samples[i], NULL, NULL);

Completed in 265 milliseconds

12