Home
last modified time | relevance | path

Searched refs:conic (Results 1 – 25 of 65) sorted by relevance

123

/external/skqp/tests/
DPathOpsConicLineIntersectionTest.cpp17 ConicPts conic; member
32 static int doIntersect(SkIntersections& intersections, const SkDConic& conic, const SkDLine& line, in doIntersect() argument
43 result = intersections.vertical(conic, top, bottom, line[0].fX, flipped); in doIntersect()
51 result = intersections.horizontal(conic, left, right, line[0].fY, flipped); in doIntersect()
53 intersections.intersect(conic, line); in doIntersect()
60 ConicPts conic; member
72 const ConicPts& c = oneOffs[index].conic; in testOneOffs()
73 SkDConic conic; in testOneOffs() local
74 conic.debugSet(c.fPts.fPts, c.fWeight); in testOneOffs()
75 SkASSERT(ValidConic(conic)); in testOneOffs()
[all …]
DPathOpsCubicConicIntersectionTest.cpp16 ConicPts conic; member
36 const ConicPts& co = cubicConicTests[index].conic; in cubicConicIntersection()
37 SkDConic conic; in cubicConicIntersection() local
38 conic.debugSet(co.fPts.fPts, co.fWeight); in cubicConicIntersection()
39 SkASSERT(ValidConic(conic)); in cubicConicIntersection()
43 int order2 = reduce2.reduce(conic.fPts); in cubicConicIntersection()
53 int roots = i.intersect(cubic, conic); in cubicConicIntersection()
58 SkDPoint xy2 = conic.ptAtT(tt2); in cubicConicIntersection()
DPathOpsConicQuadIntersectionTest.cpp15 ConicPts conic; member
28 const ConicPts& c = conicQuadTests[index].conic; in conicQuadIntersection()
29 SkDConic conic; in conicQuadIntersection() local
30 conic.debugSet(c.fPts.fPts, c.fWeight); in conicQuadIntersection()
31 SkASSERT(ValidConic(conic)); in conicQuadIntersection()
38 int order1 = reduce2.reduce(conic.fPts); in conicQuadIntersection()
49 int roots = i.intersect(conic, quad); in conicQuadIntersection()
52 SkDPoint xy1 = conic.ptAtT(tt1); in conicQuadIntersection()
DGeometryTest.cpp75 static void test_conic_eval_pos(skiatest::Reporter* reporter, const SkConic& conic, SkScalar t) { in test_conic_eval_pos() argument
77 conic.evalAt(t, &p0, nullptr); in test_conic_eval_pos()
78 p1 = conic.evalAt(t); in test_conic_eval_pos()
82 static void test_conic_eval_tan(skiatest::Reporter* reporter, const SkConic& conic, SkScalar t) { in test_conic_eval_tan() argument
84 conic.evalAt(t, nullptr, &v0); in test_conic_eval_tan()
85 v1 = conic.evalTangentAt(t); in test_conic_eval_tan()
98 SkConic conic(pts, w); in test_conic() local
103 test_conic_eval_pos(reporter, conic, t); in test_conic()
104 test_conic_eval_tan(reporter, conic, t); in test_conic()
119 SkConic conic(&pts[index * 3], 0.707f); in test_quad_tangents() local
[all …]
DPathOpsConicIntersectionTest.cpp75 SkConic conic, chopped[2]; in writePng() local
77 conic.fPts[index].fX = c.fPts[index].fX * scale; in writePng()
78 conic.fPts[index].fY = c.fPts[index].fY * scale; in writePng()
84 conic.fW = c.fW; in writePng()
89 conic.computeTightBounds(&bounds); in writePng()
100 path.moveTo(conic.fPts[0]); in writePng()
101 path.conicTo(conic.fPts[1], conic.fPts[2], conic.fW); in writePng()
161 SkConic conic; in chopBothWays() local
163 conic.fPts[index] = dConic.fPts[index].asSkPoint(); in chopBothWays()
165 conic.fW = dConic.fWeight; in chopBothWays()
[all …]
DPathOpsDebug.cpp415 SkDConic conic; in DontCallDebugSpan() local
420 SkTSect<SkDConic, SkDQuad> k1q2(conic SkDEBUGPARAMS(nullptr) PATH_OPS_DEBUG_T_SECT_PARAMS(1)); in DontCallDebugSpan()
421 … SkTSect<SkDConic, SkDConic> k1k2(conic SkDEBUGPARAMS(nullptr) PATH_OPS_DEBUG_T_SECT_PARAMS(1)); in DontCallDebugSpan()
422 … SkTSect<SkDConic, SkDCubic> k1c2(conic SkDEBUGPARAMS(nullptr) PATH_OPS_DEBUG_T_SECT_PARAMS(1)); in DontCallDebugSpan()
445 SkDConic conic; in DontCallDebugT() local
450 SkTSect<SkDConic, SkDQuad> k1q2(conic SkDEBUGPARAMS(nullptr) PATH_OPS_DEBUG_T_SECT_PARAMS(1)); in DontCallDebugT()
451 … SkTSect<SkDConic, SkDConic> k1k2(conic SkDEBUGPARAMS(nullptr) PATH_OPS_DEBUG_T_SECT_PARAMS(1)); in DontCallDebugT()
452 … SkTSect<SkDConic, SkDCubic> k1c2(conic SkDEBUGPARAMS(nullptr) PATH_OPS_DEBUG_T_SECT_PARAMS(1)); in DontCallDebugT()
475 SkDConic conic; in DontCallDumpTSect() local
480 SkTSect<SkDConic, SkDQuad> k1q2(conic SkDEBUGPARAMS(nullptr) PATH_OPS_DEBUG_T_SECT_PARAMS(1)); in DontCallDumpTSect()
[all …]
/external/skia/tests/
DPathOpsConicLineIntersectionTest.cpp17 ConicPts conic; member
32 static int doIntersect(SkIntersections& intersections, const SkDConic& conic, const SkDLine& line, in doIntersect() argument
43 result = intersections.vertical(conic, top, bottom, line[0].fX, flipped); in doIntersect()
51 result = intersections.horizontal(conic, left, right, line[0].fY, flipped); in doIntersect()
53 intersections.intersect(conic, line); in doIntersect()
60 ConicPts conic; member
72 const ConicPts& c = oneOffs[index].conic; in testOneOffs()
73 SkDConic conic; in testOneOffs() local
74 conic.debugSet(c.fPts.fPts, c.fWeight); in testOneOffs()
75 SkASSERT(ValidConic(conic)); in testOneOffs()
[all …]
DPathOpsCubicConicIntersectionTest.cpp16 ConicPts conic; member
36 const ConicPts& co = cubicConicTests[index].conic; in cubicConicIntersection()
37 SkDConic conic; in cubicConicIntersection() local
38 conic.debugSet(co.fPts.fPts, co.fWeight); in cubicConicIntersection()
39 SkASSERT(ValidConic(conic)); in cubicConicIntersection()
43 int order2 = reduce2.reduce(conic.fPts); in cubicConicIntersection()
53 int roots = i.intersect(cubic, conic); in cubicConicIntersection()
58 SkDPoint xy2 = conic.ptAtT(tt2); in cubicConicIntersection()
DPathOpsConicQuadIntersectionTest.cpp15 ConicPts conic; member
28 const ConicPts& c = conicQuadTests[index].conic; in conicQuadIntersection()
29 SkDConic conic; in conicQuadIntersection() local
30 conic.debugSet(c.fPts.fPts, c.fWeight); in conicQuadIntersection()
31 SkASSERT(ValidConic(conic)); in conicQuadIntersection()
38 int order1 = reduce2.reduce(conic.fPts); in conicQuadIntersection()
49 int roots = i.intersect(conic, quad); in conicQuadIntersection()
52 SkDPoint xy1 = conic.ptAtT(tt1); in conicQuadIntersection()
DGeometryTest.cpp75 static void test_conic_eval_pos(skiatest::Reporter* reporter, const SkConic& conic, SkScalar t) { in test_conic_eval_pos() argument
77 conic.evalAt(t, &p0, nullptr); in test_conic_eval_pos()
78 p1 = conic.evalAt(t); in test_conic_eval_pos()
82 static void test_conic_eval_tan(skiatest::Reporter* reporter, const SkConic& conic, SkScalar t) { in test_conic_eval_tan() argument
84 conic.evalAt(t, nullptr, &v0); in test_conic_eval_tan()
85 v1 = conic.evalTangentAt(t); in test_conic_eval_tan()
98 SkConic conic(pts, w); in test_conic() local
103 test_conic_eval_pos(reporter, conic, t); in test_conic()
104 test_conic_eval_tan(reporter, conic, t); in test_conic()
119 SkConic conic(&pts[index * 3], 0.707f); in test_quad_tangents() local
[all …]
DPathOpsConicIntersectionTest.cpp75 SkConic conic, chopped[2]; in writePng() local
77 conic.fPts[index].fX = c.fPts[index].fX * scale; in writePng()
78 conic.fPts[index].fY = c.fPts[index].fY * scale; in writePng()
84 conic.fW = c.fW; in writePng()
89 conic.computeTightBounds(&bounds); in writePng()
100 path.moveTo(conic.fPts[0]); in writePng()
101 path.conicTo(conic.fPts[1], conic.fPts[2], conic.fW); in writePng()
161 SkConic conic; in chopBothWays() local
163 conic.fPts[index] = dConic.fPts[index].asSkPoint(); in chopBothWays()
165 conic.fW = dConic.fWeight; in chopBothWays()
[all …]
DPathOpsDebug.cpp415 SkDConic conic; in DontCallDebugSpan() local
420 SkTSect<SkDConic, SkDQuad> k1q2(conic SkDEBUGPARAMS(nullptr) PATH_OPS_DEBUG_T_SECT_PARAMS(1)); in DontCallDebugSpan()
421 … SkTSect<SkDConic, SkDConic> k1k2(conic SkDEBUGPARAMS(nullptr) PATH_OPS_DEBUG_T_SECT_PARAMS(1)); in DontCallDebugSpan()
422 … SkTSect<SkDConic, SkDCubic> k1c2(conic SkDEBUGPARAMS(nullptr) PATH_OPS_DEBUG_T_SECT_PARAMS(1)); in DontCallDebugSpan()
445 SkDConic conic; in DontCallDebugT() local
450 SkTSect<SkDConic, SkDQuad> k1q2(conic SkDEBUGPARAMS(nullptr) PATH_OPS_DEBUG_T_SECT_PARAMS(1)); in DontCallDebugT()
451 … SkTSect<SkDConic, SkDConic> k1k2(conic SkDEBUGPARAMS(nullptr) PATH_OPS_DEBUG_T_SECT_PARAMS(1)); in DontCallDebugT()
452 … SkTSect<SkDConic, SkDCubic> k1c2(conic SkDEBUGPARAMS(nullptr) PATH_OPS_DEBUG_T_SECT_PARAMS(1)); in DontCallDebugT()
475 SkDConic conic; in DontCallDumpTSect() local
480 SkTSect<SkDConic, SkDQuad> k1q2(conic SkDEBUGPARAMS(nullptr) PATH_OPS_DEBUG_T_SECT_PARAMS(1)); in DontCallDumpTSect()
[all …]
/external/skqp/src/pathops/
DSkPathOpsConic.h73 bool hullIntersects(const SkDConic& conic, bool* isLinear) const { in hullIntersects()
74 return fPts.hullIntersects(conic.fPts, isLinear); in hullIntersects()
108 SkDConic conic; in SubDivide() local
109 conic.set(a, weight); in SubDivide()
110 return conic.subDivide(t1, t2); in SubDivide()
119 SkDConic conic; in SubDivide() local
120 conic.set(pts, weight); in SubDivide()
121 return conic.subDivide(a, c, t1, t2, newWeight); in SubDivide()
DSkPathOpsCurve.h115 SkDConic conic; in dconic_xy_at_t() local
116 conic.set(a, weight); in dconic_xy_at_t()
117 return conic.ptAtT(t); in dconic_xy_at_t()
195 SkDConic conic; in dconic_dxdy_at_t() local
196 conic.set(a, weight); in dconic_dxdy_at_t()
197 return conic.dxdyAtT(t); in dconic_dxdy_at_t()
277 SkDConic conic; in conic_is_vertical() local
278 conic.set(a, weight); in conic_is_vertical()
279 SkDConic dst = conic.subDivide(startT, endT); in conic_is_vertical()
315 SkDConic conic; in conic_intersect_ray() local
[all …]
DSkIntersections.h59 SkDConic conic; in conicHorizontal() local
60 conic.set(a, weight); in conicHorizontal()
62 return horizontal(conic, left, right, y, flipped); in conicHorizontal()
67 SkDConic conic; in conicVertical() local
68 conic.set(a, weight); in conicVertical()
70 return vertical(conic, top, bottom, x, flipped); in conicVertical()
74 SkDConic conic; in conicLine() local
75 conic.set(a, weight); in conicLine()
79 return intersect(conic, line); in conicLine()
252 static int HorizontalIntercept(const SkDConic& conic, SkScalar y, double* roots);
[all …]
DSkDConicLineIntersection.cpp347 int SkIntersections::horizontal(const SkDConic& conic, double left, double right, double y, in horizontal() argument
350 LineConicIntersections c(conic, line, this); in horizontal()
354 int SkIntersections::vertical(const SkDConic& conic, double top, double bottom, double x, in vertical() argument
357 LineConicIntersections c(conic, line, this); in vertical()
361 int SkIntersections::intersect(const SkDConic& conic, const SkDLine& line) { in intersect() argument
362 LineConicIntersections c(conic, line, this); in intersect()
367 int SkIntersections::intersectRay(const SkDConic& conic, const SkDLine& line) { in intersectRay() argument
368 LineConicIntersections c(conic, line, this); in intersectRay()
371 fPt[index] = conic.ptAtT(fT[0][index]); in intersectRay()
376 int SkIntersections::HorizontalIntercept(const SkDConic& conic, SkScalar y, double* roots) { in HorizontalIntercept() argument
[all …]
/external/skia/src/pathops/
DSkPathOpsConic.h73 bool hullIntersects(const SkDConic& conic, bool* isLinear) const { in hullIntersects()
74 return fPts.hullIntersects(conic.fPts, isLinear); in hullIntersects()
108 SkDConic conic; in SubDivide() local
109 conic.set(a, weight); in SubDivide()
110 return conic.subDivide(t1, t2); in SubDivide()
119 SkDConic conic; in SubDivide() local
120 conic.set(pts, weight); in SubDivide()
121 return conic.subDivide(a, c, t1, t2, newWeight); in SubDivide()
DSkPathOpsCurve.h115 SkDConic conic; in dconic_xy_at_t() local
116 conic.set(a, weight); in dconic_xy_at_t()
117 return conic.ptAtT(t); in dconic_xy_at_t()
195 SkDConic conic; in dconic_dxdy_at_t() local
196 conic.set(a, weight); in dconic_dxdy_at_t()
197 return conic.dxdyAtT(t); in dconic_dxdy_at_t()
277 SkDConic conic; in conic_is_vertical() local
278 conic.set(a, weight); in conic_is_vertical()
279 SkDConic dst = conic.subDivide(startT, endT); in conic_is_vertical()
315 SkDConic conic; in conic_intersect_ray() local
[all …]
DSkIntersections.h59 SkDConic conic; in conicHorizontal() local
60 conic.set(a, weight); in conicHorizontal()
62 return horizontal(conic, left, right, y, flipped); in conicHorizontal()
67 SkDConic conic; in conicVertical() local
68 conic.set(a, weight); in conicVertical()
70 return vertical(conic, top, bottom, x, flipped); in conicVertical()
74 SkDConic conic; in conicLine() local
75 conic.set(a, weight); in conicLine()
79 return intersect(conic, line); in conicLine()
252 static int HorizontalIntercept(const SkDConic& conic, SkScalar y, double* roots);
[all …]
DSkDConicLineIntersection.cpp347 int SkIntersections::horizontal(const SkDConic& conic, double left, double right, double y, in horizontal() argument
350 LineConicIntersections c(conic, line, this); in horizontal()
354 int SkIntersections::vertical(const SkDConic& conic, double top, double bottom, double x, in vertical() argument
357 LineConicIntersections c(conic, line, this); in vertical()
361 int SkIntersections::intersect(const SkDConic& conic, const SkDLine& line) { in intersect() argument
362 LineConicIntersections c(conic, line, this); in intersect()
367 int SkIntersections::intersectRay(const SkDConic& conic, const SkDLine& line) { in intersectRay() argument
368 LineConicIntersections c(conic, line, this); in intersectRay()
371 fPt[index] = conic.ptAtT(fT[0][index]); in intersectRay()
376 int SkIntersections::HorizontalIntercept(const SkDConic& conic, SkScalar y, double* roots) { in HorizontalIntercept() argument
[all …]
/external/skqp/src/core/
DSkGeometry.h348 SkConicCoeff(const SkConic& conic) { in SkConicCoeff()
349 Sk2s p0 = from_point(conic.fPts[0]); in SkConicCoeff()
350 Sk2s p1 = from_point(conic.fPts[1]); in SkConicCoeff()
351 Sk2s p2 = from_point(conic.fPts[2]); in SkConicCoeff()
352 Sk2s ww(conic.fW); in SkConicCoeff()
426 const SkPoint* computeQuads(const SkConic& conic, SkScalar tol) { in computeQuads() argument
427 int pow2 = conic.computeQuadPOW2(tol); in computeQuads()
430 fQuadCount = conic.chopIntoQuadsPOW2(pts, pow2); in computeQuads()
436 SkConic conic; in computeQuads() local
437 conic.set(pts, weight); in computeQuads()
[all …]
DSkPathMeasure.cpp81 SkConic conic(pts[0], pts[2], pts[3], pts[1].fX); in SkPathMeasure_segTo() local
85 dst->conicTo(conic.fPts[1], conic.fPts[2], conic.fW); in SkPathMeasure_segTo()
88 if (conic.chopAt(stopT, tmp)) { in SkPathMeasure_segTo()
95 if (conic.chopAt(startT, tmp1)) { in SkPathMeasure_segTo()
100 conic.chopAt(startT, stopT, &tmp); in SkPathMeasure_segTo()
254 SkScalar SkPathMeasure::compute_conic_segs(const SkConic& conic, SkScalar distance, in compute_conic_segs() argument
258 SkPoint halfPt = conic.evalAt(tValue2Scalar(halft)); in compute_conic_segs()
260 distance = this->compute_conic_segs(conic, distance, mint, minPt, halft, halfPt, ptIndex); in compute_conic_segs()
261 distance = this->compute_conic_segs(conic, distance, halft, halfPt, maxt, maxPt, ptIndex); in compute_conic_segs()
368 const SkConic conic(pts, fIter.conicWeight()); in buildSegments() local
[all …]
DSkStroke.cpp448 void SkPathStroker::setConicEndNormal(const SkConic& conic, const SkVector& normalAB, in setConicEndNormal() argument
450 setQuadEndNormal(conic.fPts, normalAB, unitNormalAB, normalBC, unitNormalBC); in setConicEndNormal()
588 static bool conic_in_line(const SkConic& conic) { in conic_in_line() argument
589 return quad_in_line(conic.fPts); in conic_in_line()
631 SkPathStroker::ReductionType SkPathStroker::CheckConicLinear(const SkConic& conic, in CheckConicLinear() argument
633 bool degenerateAB = degenerate_vector(conic.fPts[1] - conic.fPts[0]); in CheckConicLinear()
634 bool degenerateBC = degenerate_vector(conic.fPts[2] - conic.fPts[1]); in CheckConicLinear()
641 if (!conic_in_line(conic)) { in CheckConicLinear()
646 if (!conic.findMaxCurvature(&t) || 0 == t) { in CheckConicLinear()
651 (void) conic.findXExtrema(&xT); in CheckConicLinear()
[all …]
/external/skia/src/core/
DSkGeometry.h348 SkConicCoeff(const SkConic& conic) { in SkConicCoeff()
349 Sk2s p0 = from_point(conic.fPts[0]); in SkConicCoeff()
350 Sk2s p1 = from_point(conic.fPts[1]); in SkConicCoeff()
351 Sk2s p2 = from_point(conic.fPts[2]); in SkConicCoeff()
352 Sk2s ww(conic.fW); in SkConicCoeff()
426 const SkPoint* computeQuads(const SkConic& conic, SkScalar tol) { in computeQuads() argument
427 int pow2 = conic.computeQuadPOW2(tol); in computeQuads()
430 fQuadCount = conic.chopIntoQuadsPOW2(pts, pow2); in computeQuads()
436 SkConic conic; in computeQuads() local
437 conic.set(pts, weight); in computeQuads()
[all …]
DSkPathMeasure.cpp81 SkConic conic(pts[0], pts[2], pts[3], pts[1].fX); in SkPathMeasure_segTo() local
85 dst->conicTo(conic.fPts[1], conic.fPts[2], conic.fW); in SkPathMeasure_segTo()
88 if (conic.chopAt(stopT, tmp)) { in SkPathMeasure_segTo()
95 if (conic.chopAt(startT, tmp1)) { in SkPathMeasure_segTo()
100 conic.chopAt(startT, stopT, &tmp); in SkPathMeasure_segTo()
254 SkScalar SkPathMeasure::compute_conic_segs(const SkConic& conic, SkScalar distance, in compute_conic_segs() argument
258 SkPoint halfPt = conic.evalAt(tValue2Scalar(halft)); in compute_conic_segs()
260 distance = this->compute_conic_segs(conic, distance, mint, minPt, halft, halfPt, ptIndex); in compute_conic_segs()
261 distance = this->compute_conic_segs(conic, distance, halft, halfPt, maxt, maxPt, ptIndex); in compute_conic_segs()
368 const SkConic conic(pts, fIter.conicWeight()); in buildSegments() local
[all …]

123