Home
last modified time | relevance | path

Searched refs:fPts (Results 1 – 25 of 59) sorted by relevance

123

/external/skia/src/pathops/
DSkPathOpsCubic.cpp20 if (fPts[endIndex].fX == fPts[ctrlIndex].fX) { in align()
21 dstPt->fX = fPts[endIndex].fX; in align()
23 if (fPts[endIndex].fY == fPts[ctrlIndex].fY) { in align()
24 dstPt->fY = fPts[endIndex].fY; in align()
109 dst.pts[0] = fPts[0]; in chopAt()
110 dst.pts[1].fX = (fPts[0].fX + fPts[1].fX) / 2; in chopAt()
111 dst.pts[1].fY = (fPts[0].fY + fPts[1].fY) / 2; in chopAt()
112 dst.pts[2].fX = (fPts[0].fX + 2 * fPts[1].fX + fPts[2].fX) / 4; in chopAt()
113 dst.pts[2].fY = (fPts[0].fY + 2 * fPts[1].fY + fPts[2].fY) / 4; in chopAt()
114 dst.pts[3].fX = (fPts[0].fX + 3 * (fPts[1].fX + fPts[2].fX) + fPts[3].fX) / 8; in chopAt()
[all …]
DSkPathOpsQuad.cpp30 double sign = (fPts[oddMan].fY - origY) * adj - (fPts[oddMan].fX - origX) * opp; in hullIntersects()
72 endPt[opp - 1] = &fPts[end]; in otherPts()
151 double tiniest = SkTMin(SkTMin(SkTMin(SkTMin(SkTMin(fPts[0].fX, fPts[0].fY), in isLinear()
152 fPts[1].fX), fPts[1].fY), fPts[2].fX), fPts[2].fY); in isLinear()
153 double largest = SkTMax(SkTMax(SkTMax(SkTMax(SkTMax(fPts[0].fX, fPts[0].fY), in isLinear()
154 fPts[1].fX), fPts[1].fY), fPts[2].fX), fPts[2].fY); in isLinear()
163 SkDVector result = { a * fPts[0].fX + b * fPts[1].fX + c * fPts[2].fX, in dxdyAtT()
164 a * fPts[0].fY + b * fPts[1].fY + c * fPts[2].fY }; in dxdyAtT()
167 result = fPts[2] - fPts[0]; in dxdyAtT()
179 return fPts[0]; in ptAtT()
[all …]
DSkPathOpsLine.cpp11 return fPts[0]; in ptAtT()
14 return fPts[1]; in ptAtT()
17 SkDPoint result = { one_t * fPts[0].fX + t * fPts[1].fX, one_t * fPts[0].fY + t * fPts[1].fY }; in ptAtT()
22 if (xy == fPts[0]) { // do cheapest test first in exactPoint()
25 if (xy == fPts[1]) { in exactPoint()
32 if (!AlmostBetweenUlps(fPts[0].fX, xy.fX, fPts[1].fX) in nearPoint()
33 || !AlmostBetweenUlps(fPts[0].fY, xy.fY, fPts[1].fY)) { in nearPoint()
37 SkDVector len = fPts[1] - fPts[0]; // the x/y magnitudes of the line in nearPoint()
39 SkDVector ab0 = xy - fPts[0]; in nearPoint()
51 double tiniest = SkTMin(SkTMin(SkTMin(fPts[0].fX, fPts[0].fY), fPts[1].fX), fPts[1].fY); in nearPoint()
[all …]
DSkPathOpsCubic.h31 return fPts[0].approximatelyEqual(fPts[1]) && fPts[0].approximatelyEqual(fPts[2]) in collapsed()
32 && fPts[0].approximatelyEqual(fPts[3]); in collapsed()
36 SkDVector v01 = fPts[0] - fPts[1]; in controlsInside()
37 SkDVector v02 = fPts[0] - fPts[2]; in controlsInside()
38 SkDVector v03 = fPts[0] - fPts[3]; in controlsInside()
39 SkDVector v13 = fPts[1] - fPts[3]; in controlsInside()
40 SkDVector v23 = fPts[2] - fPts[3]; in controlsInside()
46 const SkDPoint& operator[](int n) const { SkASSERT(n >= 0 && n < kPointCount); return fPts[n]; }
47 SkDPoint& operator[](int n) { SkASSERT(n >= 0 && n < kPointCount); return fPts[n]; }
58 sk_bzero(fPts, sizeof(fPts)); in debugInit()
[all …]
DSkPathOpsQuad.h26 SkDPoint fPts[kPointCount]; member
29 return fPts[0].approximatelyEqual(fPts[1]) && fPts[0].approximatelyEqual(fPts[2]); in collapsed()
33 SkDVector v01 = fPts[0] - fPts[1]; in controlsInside()
34 SkDVector v02 = fPts[0] - fPts[2]; in controlsInside()
35 SkDVector v12 = fPts[1] - fPts[2]; in controlsInside()
40 sk_bzero(fPts, sizeof(fPts)); in debugInit()
44 SkDQuad result = {{fPts[2], fPts[1], fPts[0]}}; in flip()
51 fPts[0] = pts[0]; in set()
52 fPts[1] = pts[1]; in set()
53 fPts[2] = pts[2]; in set()
[all …]
DSkOpCubicHull.cpp60 if (fPts[yMin].fY > fPts[index].fY || (fPts[yMin].fY == fPts[index].fY in convexHull()
61 && fPts[yMin].fX > fPts[index].fX)) { in convexHull()
92 if (fPts[1] == fPts[0] || fPts[1] == fPts[3]) { in convexHull()
96 if (fPts[2] == fPts[0] || fPts[2] == fPts[3]) { in convexHull()
101 double dist1_0 = fPts[1].distanceSquared(fPts[0]); in convexHull()
102 double dist1_3 = fPts[1].distanceSquared(fPts[3]); in convexHull()
103 double dist2_0 = fPts[2].distanceSquared(fPts[0]); in convexHull()
104 double dist2_3 = fPts[2].distanceSquared(fPts[3]); in convexHull()
DSkPathOpsConic.h19 SkDQuad fPts; member
23 return fPts.collapsed(); in collapsed()
27 return fPts.controlsInside(); in controlsInside()
31 fPts.debugInit(); in debugInit()
35 SkDConic result = {{{fPts[2], fPts[1], fPts[0]}}, fWeight}; in flip()
42 fPts.set(pts); in set()
47 const SkDPoint& operator[](int n) const { return fPts[n]; }
48 SkDPoint& operator[](int n) { return fPts[n]; }
55 fPts.align(endIndex, dstPt); in align()
62 return fPts.hullIntersects(quad, isLinear); in hullIntersects()
[all …]
DSkPathOpsConic.cpp48 conic_eval_tan(&fPts[0].fX, fWeight, t), in dxdyAtT()
49 conic_eval_tan(&fPts[0].fY, fWeight, t) in dxdyAtT()
53 result = fPts[2] - fPts[0]; in dxdyAtT()
86 return fPts[0]; in ptAtT()
89 return fPts[2]; in ptAtT()
93 conic_eval_numerator(&fPts[0].fX, fWeight, t) / denominator, in ptAtT()
94 conic_eval_numerator(&fPts[0].fY, fWeight, t) / denominator in ptAtT()
123 ax = fPts[0].fX; in subDivide()
124 ay = fPts[0].fY; in subDivide()
127 ax = conic_eval_numerator(&fPts[0].fX, fWeight, t1); in subDivide()
[all …]
DSkDCubicToQuads.cpp37 quad[0] = fPts[0]; in toQuad()
38 const SkDPoint fromC1 = {(3 * fPts[1].fX - fPts[0].fX) / 2, (3 * fPts[1].fY - fPts[0].fY) / 2}; in toQuad()
39 const SkDPoint fromC2 = {(3 * fPts[2].fX - fPts[3].fX) / 2, (3 * fPts[2].fY - fPts[3].fY) / 2}; in toQuad()
42 quad[2] = fPts[3]; in toQuad()
DSkPathOpsLine.h13 SkDPoint fPts[2]; member
15 const SkDPoint& operator[](int n) const { SkASSERT(n >= 0 && n < 2); return fPts[n]; }
16 SkDPoint& operator[](int n) { SkASSERT(n >= 0 && n < 2); return fPts[n]; }
19 fPts[0] = pts[0]; in set()
20 fPts[1] = pts[1]; in set()
DSkOpSegment.cpp183 if (newPt == segment->fPts[0]) { in addAlignIntersection()
186 if (newPt == segment->fPts[SkPathOpsVerbToPoints(segment->fVerb)]) { in addAlignIntersection()
189 if (oldPt == segment->fPts[0]) { in addAlignIntersection()
192 if (oldPt == segment->fPts[SkPathOpsVerbToPoints(segment->fVerb)]) { in addAlignIntersection()
202 bLine.set(segment->fPts); in addAlignIntersection()
207 bQuad.set(segment->fPts); in addAlignIntersection()
212 bConic.set(segment->fPts, segment->fWeight); in addAlignIntersection()
217 bCubic.set(segment->fPts); in addAlignIntersection()
252 ePtr = fPts; in addCurveTo()
257 ePtr = edge.fPts; in addCurveTo()
[all …]
/external/skia/src/gpu/batches/
DGrAAConvexTessellator.h48 int numPts() const { return fPts.count(); } in numPts()
51 const SkPoint& lastPoint() const { return fPts.top(); } in lastPoint()
52 const SkPoint& point(int index) const { return fPts[index]; } in point()
68 void setReserve(int numPts) { fPts.setReserve(numPts); } in setReserve()
69 void rewind() { fPts.rewind(); } in rewind()
71 int numPts() const { return fPts.count(); } in numPts()
73 const SkPoint& lastPoint() const { return fPts.top().fPt; } in lastPoint()
74 const SkPoint& firstPoint() const { return fPts[0].fPt; } in firstPoint()
75 const SkPoint& point(int index) const { return fPts[index].fPt; } in point()
77 int originatingIdx(int index) const { return fPts[index].fOriginatingIdx; } in originatingIdx()
[all …]
DGrAAConvexTessellator.cpp66 int index = fPts.count(); in addPt()
67 *fPts.push() = pt; in addPt()
79 fPts.pop(); in popLastPt()
89 fPts.removeShuffle(0); in popFirstPtShuffle()
103 fPts[index] = pt; in updatePt()
118 fPts.rewind(); in rewind()
244 SkPoint v = p - fPts[edgeIdx]; in computeDepthFromEdge()
261 SkScalar t = perp_intersect(fPts[startIdx], bisector, fPts[edgeIdx], norm); in computePtAlongBisector()
264 SkASSERT(startIdx < fPts.count()); in computePtAlongBisector()
265 newP = fPts[startIdx]; in computePtAlongBisector()
[all …]
/external/skia/tests/
DPathOpsConicIntersectionTest.cpp53 up.set(chopped[cIndex].fPts[pIndex]); in chopCompare()
54 SkASSERT(dChopped[cIndex].fPts[pIndex].approximatelyEqual(up)); in chopCompare()
77 conic.fPts[index].fX = c.fPts[index].fX * scale; in writePng()
78 conic.fPts[index].fY = c.fPts[index].fY * scale; in writePng()
80 chopped[chIndex].fPts[index].fX = ch[chIndex].fPts[index].fX * scale; in writePng()
81 chopped[chIndex].fPts[index].fY = ch[chIndex].fPts[index].fY * scale; in writePng()
100 path.moveTo(conic.fPts[0]); in writePng()
101 path.conicTo(conic.fPts[1], conic.fPts[2], conic.fW); in writePng()
105 path.moveTo(chopped[0].fPts[0]); in writePng()
106 path.conicTo(chopped[0].fPts[1], chopped[0].fPts[2], chopped[0].fW); in writePng()
[all …]
/external/skia/bench/
DGeometryBench.cpp137 SkPoint fPts[4]; member in QuadBenchBase
142 fPts[i].set(rand.nextUScalar1(), rand.nextUScalar1()); in QuadBenchBase()
154 SkEvalQuadAt(fPts, 0.5f, &result); in onDraw()
155 SkEvalQuadAt(fPts, 0.5f, &result); in onDraw()
156 SkEvalQuadAt(fPts, 0.5f, &result); in onDraw()
157 SkEvalQuadAt(fPts, 0.5f, &result); in onDraw()
170 result = SkEvalQuadAt(fPts, 0.5f); in onDraw()
171 result = SkEvalQuadAt(fPts, 0.5f); in onDraw()
172 result = SkEvalQuadAt(fPts, 0.5f); in onDraw()
173 result = SkEvalQuadAt(fPts, 0.5f); in onDraw()
[all …]
/external/skia/samplecode/
DSampleQuadStroker.cpp105 SkPoint fPts[kCount]; member in QuadStrokerView
143 fPts[0].set(50, 200); // cubic in QuadStrokerView()
144 fPts[1].set(50, 100); in QuadStrokerView()
145 fPts[2].set(150, 50); in QuadStrokerView()
146 fPts[3].set(300, 50); in QuadStrokerView()
148 fPts[4].set(350, 200); // conic in QuadStrokerView()
149 fPts[5].set(350, 100); in QuadStrokerView()
150 fPts[6].set(450, 50); in QuadStrokerView()
152 fPts[7].set(150, 300); // quad in QuadStrokerView()
153 fPts[8].set(150, 200); in QuadStrokerView()
[all …]
DSamplePatch.cpp53 Patch() { sk_bzero(fPts, sizeof(fPts)); } in Patch()
57 memcpy(fPts, pts, 12 * sizeof(SkPoint)); in setPatch()
58 fPts[12] = pts[0]; // the last shall be first in setPatch()
66 SkPoint fPts[13]; member in Patch
142 eval_patch_edge(fPts + 0, edge0, nu); in draw()
143 eval_patch_edge(fPts + 3, edge1, nv); in draw()
144 eval_patch_edge(fPts + 6, edge2, nu); in draw()
145 eval_patch_edge(fPts + 9, edge3, nv); in draw()
229 SkPoint fPts[12]; member in PatchView
242 fPts[0].set(S*0, T); in PatchView()
[all …]
DPerlinPatch.cpp69 SkPoint fPts[SkPatchUtils::kNumCtrlPts]; member in PerlinPatchView
80 fPts[0].set(100 * s, 100 * s); in PerlinPatchView()
81 fPts[1].set(150 * s, 50 * s); in PerlinPatchView()
82 fPts[2].set(250 * s, 150 * s); in PerlinPatchView()
83 fPts[3].set(300 * s, 100 * s); in PerlinPatchView()
85 fPts[4].set(275 * s, 150 * s); in PerlinPatchView()
86 fPts[5].set(350 * s, 250 * s); in PerlinPatchView()
88 fPts[6].set(300 * s, 300 * s); in PerlinPatchView()
89 fPts[7].set(250 * s, 250 * s); in PerlinPatchView()
91 fPts[8].set(150 * s, 350 * s); in PerlinPatchView()
[all …]
DSamplePath.cpp236 SkPoint fPts[N]; member in ArcToView
243 fPts[i].fX = 20 + rand.nextUScalar1() * 640; in ArcToView()
244 fPts[i].fY = 20 + rand.nextUScalar1() * 480; in ArcToView()
296 path->moveTo(fPts[0]); in makePath()
298 path->lineTo(fPts[i]); in makePath()
306 canvas->drawPoints(SkCanvas::kPoints_PointMode, N, fPts, fPtsPaint); in onDrawContent()
325 fPts[index] = click->fCurr; in onClick()
336 if (r.intersects(SkRect::MakeXYWH(fPts[i].fX, fPts[i].fY, 1, 1))) { in onFindClickHandler()
/external/skia/gm/
Dvertices.cpp26 SkPoint fPts[9]; member in VerticesGM
46 fPts[0].set(0, 0); fPts[1].set(X/2, 10); fPts[2].set(X, 0); in onOnceBeforeDraw()
47 fPts[3].set(10, Y/2); fPts[4].set(X/2, Y/2); fPts[5].set(X-10, Y/2); in onOnceBeforeDraw()
48 fPts[6].set(0, Y); fPts[7].set(X/2, Y-10); fPts[8].set(X, Y); in onOnceBeforeDraw()
109 SK_ARRAY_COUNT(fPts), fPts, in onDraw()
/external/skia/src/core/
DSkGeometry.cpp980 ratquad_mapTo3D(fPts, fW, tmp); in chopAt()
986 dst[0].fPts[0] = fPts[0]; in chopAt()
987 tmp2[0].projectDown(&dst[0].fPts[1]); in chopAt()
988 tmp2[1].projectDown(&dst[0].fPts[2]); dst[1].fPts[0] = dst[0].fPts[2]; in chopAt()
989 tmp2[2].projectDown(&dst[1].fPts[1]); in chopAt()
990 dst[1].fPts[2] = fPts[2]; in chopAt()
1028 dst->fPts[0] = to_point(aXY / aZZ); in chopAt()
1029 dst->fPts[1] = to_point(bXY / bZZ); in chopAt()
1030 dst->fPts[2] = to_point(cXY / cZZ); in chopAt()
1043 if ((t == 0 && fPts[0] == fPts[1]) || (t == 1 && fPts[1] == fPts[2])) { in evalTangentAt()
[all …]
DSkGeometry.h185 fPts[0] = p0; in SkConic()
186 fPts[1] = p1; in SkConic()
187 fPts[2] = p2; in SkConic()
191 memcpy(fPts, pts, sizeof(fPts)); in SkConic()
195 SkPoint fPts[3]; member
199 memcpy(fPts, pts, 3 * sizeof(SkPoint)); in set()
204 fPts[0] = p0; in set()
205 fPts[1] = p1; in set()
206 fPts[2] = p2; in set()
306 Sk2s p0 = from_point(conic.fPts[0]); in SkConicCoeff()
[all …]
DSkPathMeasure.cpp238 fPts.append(1, pts); in buildSegments()
257 fPts.append(1, pts + 1); in buildSegments()
278 fPts.append(2, pts + 1); in buildSegments()
286 distance = this->compute_conic_segs(conic, distance, 0, conic.fPts[0], in buildSegments()
287 kMaxTValue, conic.fPts[2], ptIndex); in buildSegments()
292 fPts.append()->set(conic.fW, 0); in buildSegments()
293 fPts.append(2, pts + 1); in buildSegments()
302 fPts.append(3, pts + 1); in buildSegments()
433 dst->conicTo(conic.fPts[1], conic.fPts[2], conic.fW); in seg_to()
437 dst->conicTo(tmp[0].fPts[1], tmp[0].fPts[2], tmp[0].fW); in seg_to()
[all …]
/external/skia/src/utils/
DSkDashPath.cpp157 if (rec->isHairlineStyle() || !src.isLine(fPts)) { in init()
166 SkScalar pathLength = SkPoint::Distance(fPts[0], fPts[1]); in init()
168 fTangent = fPts[1] - fPts[0]; in init()
200 SkScalar x0 = fPts[0].fX + SkScalarMul(fTangent.fX, d0); in addSegment()
201 SkScalar x1 = fPts[0].fX + SkScalarMul(fTangent.fX, d1); in addSegment()
202 SkScalar y0 = fPts[0].fY + SkScalarMul(fTangent.fY, d0); in addSegment()
203 SkScalar y1 = fPts[0].fY + SkScalarMul(fTangent.fY, d1); in addSegment()
215 SkPoint fPts[2]; member in SpecialLineRec
DSkBoundaryPatch.cpp67 return SkPointInterp(fPts[e], fPts[(e + 1) & 3], t); in eval()
74 fPts[12] = fPts[0]; in eval()
77 SkEvalCubicAt(&fPts[e * 3], t, &loc, nullptr, nullptr); in eval()

123