Home
last modified time | relevance | path

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

12345

/third_party/flutter/skia/tests/
DPathOpsConicLineIntersectionTest.cpp19 ConicPts conic; member
34 static int doIntersect(SkIntersections& intersections, const SkDConic& conic, const SkDLine& line, in doIntersect() argument
46 result = intersections.vertical(conic, top, bottom, line[0].fX, flipped); in doIntersect()
55 result = intersections.horizontal(conic, left, right, line[0].fY, flipped); in doIntersect()
57 intersections.intersect(conic, line); in doIntersect()
64 ConicPts conic; member
76 const ConicPts& c = oneOffs[index].conic; in testOneOffs()
77 SkDConic conic; in testOneOffs() local
78 conic.debugSet(c.fPts.fPts, c.fWeight); in testOneOffs()
79 SkASSERT(ValidConic(conic)); in testOneOffs()
[all …]
DPathOpsConicQuadIntersectionTest.cpp15 ConicPts conic; member
35 const ConicPts& c = conicQuadTests[index].conic; in conicQuadIntersection()
36 SkDConic conic; in conicQuadIntersection() local
37 conic.debugSet(c.fPts.fPts, c.fWeight); in conicQuadIntersection()
38 SkASSERT(ValidConic(conic)); in conicQuadIntersection()
45 int order1 = reduce2.reduce(conic.fPts); in conicQuadIntersection()
56 int roots = i.intersect(conic, quad); in conicQuadIntersection()
59 SkDPoint xy1 = conic.ptAtT(tt1); in conicQuadIntersection()
DPathOpsCubicConicIntersectionTest.cpp16 ConicPts conic; member
50 const ConicPts& co = cubicConicTests[index].conic; in cubicConicIntersection()
51 SkDConic conic; in cubicConicIntersection() local
52 conic.debugSet(co.fPts.fPts, co.fWeight); in cubicConicIntersection()
53 SkASSERT(ValidConic(conic)); in cubicConicIntersection()
57 int order2 = reduce2.reduce(conic.fPts); in cubicConicIntersection()
67 int roots = i.intersect(cubic, conic); in cubicConicIntersection()
72 SkDPoint xy2 = conic.ptAtT(tt2); in cubicConicIntersection()
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()
159 SkConic conic; in chopBothWays() local
161 conic.fPts[index] = dConic.fPts[index].asSkPoint(); in chopBothWays()
163 conic.fW = dConic.fWeight; in chopBothWays()
[all …]
DGeometryTest.cpp86 static void test_conic_eval_pos(skiatest::Reporter* reporter, const SkConic& conic, SkScalar t) { in test_conic_eval_pos() argument
88 conic.evalAt(t, &p0, nullptr); in test_conic_eval_pos()
89 p1 = conic.evalAt(t); in test_conic_eval_pos()
93 static void test_conic_eval_tan(skiatest::Reporter* reporter, const SkConic& conic, SkScalar t) { in test_conic_eval_tan() argument
95 conic.evalAt(t, nullptr, &v0); in test_conic_eval_tan()
96 v1 = conic.evalTangentAt(t); in test_conic_eval_tan()
109 SkConic conic(pts, w); in test_conic() local
114 test_conic_eval_pos(reporter, conic, t); in test_conic()
115 test_conic_eval_tan(reporter, conic, t); in test_conic()
130 SkConic conic(&pts[index * 3], 0.707f); in test_quad_tangents() local
[all …]
/third_party/skia/tests/
DPathOpsConicLineIntersectionTest.cpp19 ConicPts conic; member
34 static int doIntersect(SkIntersections& intersections, const SkDConic& conic, const SkDLine& line, in doIntersect() argument
46 result = intersections.vertical(conic, top, bottom, line[0].fX, flipped); in doIntersect()
55 result = intersections.horizontal(conic, left, right, line[0].fY, flipped); in doIntersect()
57 intersections.intersect(conic, line); in doIntersect()
64 ConicPts conic; member
76 const ConicPts& c = oneOffs[index].conic; in testOneOffs()
77 SkDConic conic; in testOneOffs() local
78 conic.debugSet(c.fPts.fPts, c.fWeight); in testOneOffs()
79 SkASSERT(ValidConic(conic)); in testOneOffs()
[all …]
DPathOpsCubicConicIntersectionTest.cpp16 ConicPts conic; member
50 const ConicPts& co = cubicConicTests[index].conic; in cubicConicIntersection()
51 SkDConic conic; in cubicConicIntersection() local
52 conic.debugSet(co.fPts.fPts, co.fWeight); in cubicConicIntersection()
53 SkASSERT(ValidConic(conic)); in cubicConicIntersection()
57 int order2 = reduce2.reduce(conic.fPts); in cubicConicIntersection()
67 int roots = i.intersect(cubic, conic); in cubicConicIntersection()
72 SkDPoint xy2 = conic.ptAtT(tt2); in cubicConicIntersection()
DPathOpsConicQuadIntersectionTest.cpp15 ConicPts conic; member
35 const ConicPts& c = conicQuadTests[index].conic; in conicQuadIntersection()
36 SkDConic conic; in conicQuadIntersection() local
37 conic.debugSet(c.fPts.fPts, c.fWeight); in conicQuadIntersection()
38 SkASSERT(ValidConic(conic)); in conicQuadIntersection()
45 int order1 = reduce2.reduce(conic.fPts); in conicQuadIntersection()
56 int roots = i.intersect(conic, quad); in conicQuadIntersection()
59 SkDPoint xy1 = conic.ptAtT(tt1); in conicQuadIntersection()
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()
159 SkConic conic; in chopBothWays() local
161 conic.fPts[index] = dConic.fPts[index].asSkPoint(); in chopBothWays()
163 conic.fW = dConic.fWeight; in chopBothWays()
[all …]
DGeometryTest.cpp154 static void test_conic_eval_pos(skiatest::Reporter* reporter, const SkConic& conic, SkScalar t) { in test_conic_eval_pos() argument
156 conic.evalAt(t, &p0, nullptr); in test_conic_eval_pos()
157 p1 = conic.evalAt(t); in test_conic_eval_pos()
161 static void test_conic_eval_tan(skiatest::Reporter* reporter, const SkConic& conic, SkScalar t) { in test_conic_eval_tan() argument
163 conic.evalAt(t, nullptr, &v0); in test_conic_eval_tan()
164 v1 = conic.evalTangentAt(t); in test_conic_eval_tan()
177 SkConic conic(pts, w); in test_conic() local
182 test_conic_eval_pos(reporter, conic, t); in test_conic()
183 test_conic_eval_tan(reporter, conic, t); in test_conic()
198 SkConic conic(&pts[index * 3], 0.707f); in test_quad_tangents() local
[all …]
/third_party/skia/docs/examples/
DPath_ConvertConicToQuads.cpp12 SkPoint conic[] = { {20, 170}, {80, 170}, {80, 230} }; in draw() local
15 SkPath::ConvertConicToQuads(conic[0], conic[1], conic[2], weight, quads, 1); in draw()
17 path.moveTo(conic[0]); in draw()
18 path.conicTo(conic[1], conic[2], weight); in draw()
/third_party/flutter/skia/docs/examples/
DPath_ConvertConicToQuads.cpp12 SkPoint conic[] = { {20, 170}, {80, 170}, {80, 230} }; in draw() local
15 SkPath::ConvertConicToQuads(conic[0], conic[1], conic[2], weight, quads, 1); in draw()
17 path.moveTo(conic[0]); in draw()
18 path.conicTo(conic[1], conic[2], weight); in draw()
/third_party/skia/src/pathops/
DSkPathOpsConic.h73 bool hullIntersects(const SkDConic& conic, bool* isLinear) const { in hullIntersects()
74 return fPts.hullIntersects(conic.fPts, isLinear); in hullIntersects()
113 SkDConic conic; in SubDivide() local
114 conic.set(a, weight); in SubDivide()
115 return conic.subDivide(t1, t2); in SubDivide()
124 SkDConic conic; in SubDivide() local
125 conic.set(pts, weight); in SubDivide()
126 return conic.subDivide(a, c, t1, t2, newWeight); in SubDivide()
163 bool hullIntersects(const SkDConic& conic, bool* isLinear) const override { in hullIntersects() argument
164 return conic.hullIntersects(fConic, isLinear); in hullIntersects()
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 …]
/third_party/flutter/skia/src/pathops/
DSkPathOpsConic.h73 bool hullIntersects(const SkDConic& conic, bool* isLinear) const { in hullIntersects()
74 return fPts.hullIntersects(conic.fPts, isLinear); in hullIntersects()
113 SkDConic conic; in SubDivide() local
114 conic.set(a, weight); in SubDivide()
115 return conic.subDivide(t1, t2); in SubDivide()
124 SkDConic conic; in SubDivide() local
125 conic.set(pts, weight); in SubDivide()
126 return conic.subDivide(a, c, t1, t2, newWeight); in SubDivide()
163 bool hullIntersects(const SkDConic& conic, bool* isLinear) const override { in hullIntersects() argument
164 return conic.hullIntersects(fConic, isLinear); in hullIntersects()
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 …]
/third_party/flutter/skia/src/core/
DSkGeometry.h349 SkConicCoeff(const SkConic& conic) { in SkConicCoeff()
350 Sk2s p0 = from_point(conic.fPts[0]); in SkConicCoeff()
351 Sk2s p1 = from_point(conic.fPts[1]); in SkConicCoeff()
352 Sk2s p2 = from_point(conic.fPts[2]); in SkConicCoeff()
353 Sk2s ww(conic.fW); in SkConicCoeff()
427 const SkPoint* computeQuads(const SkConic& conic, SkScalar tol) { in computeQuads() argument
428 int pow2 = conic.computeQuadPOW2(tol); in computeQuads()
431 fQuadCount = conic.chopIntoQuadsPOW2(pts, pow2); in computeQuads()
437 SkConic conic; in computeQuads() local
438 conic.set(pts, weight); in computeQuads()
[all …]
DSkContourMeasure.cpp73 SkConic conic(pts[0], pts[2], pts[3], pts[1].fX); in SkContourMeasure_segTo() local
77 dst->conicTo(conic.fPts[1], conic.fPts[2], conic.fW); in SkContourMeasure_segTo()
80 if (conic.chopAt(stopT, tmp)) { in SkContourMeasure_segTo()
87 if (conic.chopAt(startT, tmp1)) { in SkContourMeasure_segTo()
92 conic.chopAt(startT, stopT, &tmp); in SkContourMeasure_segTo()
195 SkScalar SkContourMeasureIter::compute_conic_segs(const SkConic& conic, SkScalar distance, in compute_conic_segs() argument
200 SkPoint halfPt = conic.evalAt(tValue2Scalar(halft)); in compute_conic_segs()
205 distance = this->compute_conic_segs(conic, distance, mint, minPt, halft, halfPt, ptIndex); in compute_conic_segs()
206 distance = this->compute_conic_segs(conic, distance, halft, halfPt, maxt, maxPt, ptIndex); in compute_conic_segs()
318 const SkConic conic(pts, fIter.conicWeight()); in buildSegments() local
[all …]
/third_party/skia/src/core/
DSkGeometry.h421 SkConicCoeff(const SkConic& conic) { in SkConicCoeff()
422 Sk2s p0 = from_point(conic.fPts[0]); in SkConicCoeff()
423 Sk2s p1 = from_point(conic.fPts[1]); in SkConicCoeff()
424 Sk2s p2 = from_point(conic.fPts[2]); in SkConicCoeff()
425 Sk2s ww(conic.fW); in SkConicCoeff()
499 const SkPoint* computeQuads(const SkConic& conic, SkScalar tol) { in computeQuads() argument
500 int pow2 = conic.computeQuadPOW2(tol); in computeQuads()
503 fQuadCount = conic.chopIntoQuadsPOW2(pts, pow2); in computeQuads()
509 SkConic conic; in computeQuads() local
510 conic.set(pts, weight); in computeQuads()
[all …]
DSkContourMeasure.cpp78 SkConic conic(pts[0], pts[2], pts[3], pts[1].fX); in SkContourMeasure_segTo() local
82 dst->conicTo(conic.fPts[1], conic.fPts[2], conic.fW); in SkContourMeasure_segTo()
85 if (conic.chopAt(stopT, tmp)) { in SkContourMeasure_segTo()
92 if (conic.chopAt(startT, tmp)) { in SkContourMeasure_segTo()
97 conic.chopAt(startT, stopT, &tmp); in SkContourMeasure_segTo()
200 SkScalar compute_conic_segs(const SkConic& conic, SkScalar distance,
233 SkScalar SkContourMeasureIter::Impl::compute_conic_segs(const SkConic& conic, SkScalar distance, in compute_conic_segs() argument
238 SkPoint halfPt = conic.evalAt(tValue2Scalar(halft)); in compute_conic_segs()
243 distance = this->compute_conic_segs(conic, distance, mint, minPt, halft, halfPt, ptIndex); in compute_conic_segs()
244 distance = this->compute_conic_segs(conic, distance, halft, halfPt, maxt, maxPt, ptIndex); in compute_conic_segs()
[all …]
/third_party/skia/src/gpu/tessellate/
DStrokeFixedCountTessellator.cpp95 SkPoint conic[4]; in conicTo() local
96 GrTessellationShader::WriteConicPatch(p, w, conic); in conicTo()
97 SkPoint endControlPoint = conic[1]; in conicTo()
98 this->writeStroke(conic, endControlPoint, GrTessellationShader::kConicCurveType); in conicTo()
153 void chopConicTo(const SkConic& conic) { in chopConicTo() argument
155 if (!conic.chopAt(.5f, chops)) { in chopConicTo()
326 SkConic conic(p, strokeIter.w()); in prepare() local
327 SkPoint cusp = conic.evalAt(conic.findMidTangent()); in prepare()

12345