Home
last modified time | relevance | path

Searched refs:SkDPoint (Results 1 – 25 of 55) sorted by relevance

123

/external/skia/src/pathops/
DSkPathOpsLine.h13 SkDPoint fPts[2];
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]; }
24 double exactPoint(const SkDPoint& xy) const;
25 static double ExactPointH(const SkDPoint& xy, double left, double right, double y);
26 static double ExactPointV(const SkDPoint& xy, double top, double bottom, double x);
28 double nearPoint(const SkDPoint& xy, bool* unequal) const;
29 bool nearRay(const SkDPoint& xy) const;
30 static double NearPointH(const SkDPoint& xy, double left, double right, double y);
31 static double NearPointV(const SkDPoint& xy, double top, double bottom, double x);
[all …]
DSkPathOpsQuad.h18 SkDPoint pts[5];
26 SkDPoint fPts[kPointCount];
43 void debugSet(const SkDPoint* pts);
61 const SkDPoint& operator[](int n) const { SkASSERT(n >= 0 && n < kPointCount); return fPts[n]; }
62 SkDPoint& operator[](int n) { SkASSERT(n >= 0 && n < kPointCount); return fPts[n]; }
65 void align(int endIndex, SkDPoint* dstPt) const;
86 void otherPts(int oddMan, const SkDPoint* endPt[2]) const;
87 SkDPoint ptAtT(double t) const;
97 SkDPoint subDivide(const SkDPoint& a, const SkDPoint& c, double t1, double t2) const;
98 static SkDPoint SubDivide(const SkPoint pts[kPointCount], const SkDPoint& a, const SkDPoint& c, in SubDivide()
DSkPathOpsCubic.h42 const SkDPoint& operator[](int n) const { SkASSERT(n >= 0 && n < kPointCount); return fPts[n]; }
43 SkDPoint& operator[](int n) { SkASSERT(n >= 0 && n < kPointCount); return fPts[n]; }
45 void align(int endIndex, int ctrlIndex, SkDPoint* dstPt) const;
57 void debugSet(const SkDPoint* pts);
81 bool hullIntersects(const SkDPoint* pts, int ptCount, bool* isLinear) const;
85 void otherPts(int index, const SkDPoint* o1Pts[kPointCount - 1]) const;
86 SkDPoint ptAtT(double t) const;
123 void subDivide(const SkDPoint& a, const SkDPoint& d, double t1, double t2, SkDPoint p[2]) const;
125 …static void SubDivide(const SkPoint pts[kPointCount], const SkDPoint& a, const SkDPoint& d, double… in SubDivide()
126 double t2, SkDPoint p[2]) { in SubDivide()
[all …]
DSkPathOpsPoint.h94 struct SkDPoint { struct
103 friend SkDVector operator-(const SkDPoint& a, const SkDPoint& b); argument
105 friend bool operator==(const SkDPoint& a, const SkDPoint& b) {
109 friend bool operator!=(const SkDPoint& a, const SkDPoint& b) {
131 SkDPoint operator+(const SkDVector& v) {
132 SkDPoint result = *this; argument
138 SkDPoint operator-(const SkDVector& v) {
139 SkDPoint result = *this; argument
147 bool approximatelyDEqual(const SkDPoint& a) const { in approximatelyDEqual() argument
162 SkDPoint dA; in approximatelyDEqual() argument
[all …]
DSkPathOpsConic.h34 void debugSet(const SkDPoint* pts, SkScalar weight);
55 const SkDPoint& operator[](int n) const { return fPts[n]; }
56 SkDPoint& operator[](int n) { return fPts[n]; }
62 void align(int endIndex, SkDPoint* dstPt) const { in align()
91 void otherPts(int oddMan, const SkDPoint* endPt[2]) const { in otherPts()
95 SkDPoint ptAtT(double t) const;
113 SkDPoint subDivide(const SkDPoint& a, const SkDPoint& c, double t1, double t2,
116 static SkDPoint SubDivide(const SkPoint pts[kPointCount], SkScalar weight, in SubDivide()
117 const SkDPoint& a, const SkDPoint& c, in SubDivide()
DSkPathOpsLine.cpp9 SkDPoint SkDLine::ptAtT(double t) const { 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()
21 double SkDLine::exactPoint(const SkDPoint& xy) const { in exactPoint()
31 double SkDLine::nearPoint(const SkDPoint& xy, bool* unequal) const { in nearPoint()
48 SkDPoint realPt = ptAtT(t); in nearPoint()
65 bool SkDLine::nearRay(const SkDPoint& xy) const { in nearRay()
72 SkDPoint realPt = ptAtT(t); in nearRay()
81 double SkDLine::ExactPointH(const SkDPoint& xy, double left, double right, double y) { in ExactPointH()
93 double SkDLine::NearPointH(const SkDPoint& xy, double left, double right, double y) { in NearPointH()
116 double SkDLine::ExactPointV(const SkDPoint& xy, double top, double bottom, double x) { in ExactPointV()
[all …]
DSkPathOpsCurve.h57 const SkDPoint& operator[](int n) const {
62 SkDPoint& operator[](int n) {
67 SkDPoint conicTop(const SkPoint curve[3], SkScalar curveWeight,
69 SkDPoint cubicTop(const SkPoint curve[4], SkScalar , double s, double e, double* topT);
72 SkDPoint lineTop(const SkPoint[2], SkScalar , double , double , double* topT);
73 double nearPoint(SkPath::Verb verb, const SkDPoint& xy, const SkDPoint& opp) const;
75 SkDPoint quadTop(const SkPoint curve[3], SkScalar , double s, double e, double* topT);
99 extern SkDPoint (SkDCurve::* const Top[])(const SkPoint curve[], SkScalar cWeight,
102 static SkDPoint dline_xy_at_t(const SkPoint a[2], SkScalar , double t) { in dline_xy_at_t()
108 static SkDPoint dquad_xy_at_t(const SkPoint a[3], SkScalar , double t) { in dquad_xy_at_t()
[all …]
DSkPathOpsQuad.cpp14 static bool pointInTriangle(const SkDPoint fPts[3], const SkDPoint& test) { in pointInTriangle()
31 static bool matchesEnd(const SkDPoint fPts[3], const SkDPoint& test) { in matchesEnd()
46 const SkDPoint* endPt[2]; in hullIntersects()
98 void SkDQuad::otherPts(int oddMan, const SkDPoint* endPt[2]) const { in otherPts()
207 SkDPoint SkDQuad::ptAtT(double t) const { in ptAtT()
218 SkDPoint result = { a * fPts[0].fX + b * fPts[1].fX + c * fPts[2].fX, in ptAtT()
284 void SkDQuad::align(int endIndex, SkDPoint* dstPt) const { in align()
293 SkDPoint SkDQuad::subDivide(const SkDPoint& a, const SkDPoint& c, double t1, double t2) const { in subDivide()
295 SkDPoint b; in subDivide()
305 return SkDPoint::Mid(b0[1], b1[1]); in subDivide()
DSkIntersections.h120 int insertSwap(double one, double two, const SkDPoint& pt) { in insertSwap()
160 const SkDPoint& pt(int index) const { in pt()
164 const SkDPoint& pt2(int index) const { in pt2()
239 int closestTo(double rangeStart, double rangeEnd, const SkDPoint& testPt, double* dist) const;
240 void cubicInsert(double one, double two, const SkDPoint& pt, const SkDCubic& c1,
254 int insert(double one, double two, const SkDPoint& pt);
255 void insertNear(double one, double two, const SkDPoint& pt1, const SkDPoint& pt2);
257 int insertCoincident(double one, double two, const SkDPoint& pt);
273 int mostOutside(double rangeStart, double rangeEnd, const SkDPoint& origin) const;
311 SkDPoint fPt[13]; // FIXME: since scans store points as SkPoint, this should also
[all …]
DSkDCubicLineIntersection.cpp101 SkDPoint cubicMidPt = fCubic.ptAtT(cubicMidT); in checkCoincident()
133 SkDPoint calcPt = c.ptAtT(roots[index]); in intersectRay()
158 SkDPoint pt; in intersect()
173 SkDPoint calcPt = c.ptAtT(roots[index]); in HorizontalIntersect()
193 SkDPoint pt = { fCubic.ptAtT(cubicT).fX, axisIntercept }; in horizontalIntersect()
206 bool uniqueAnswer(double cubicT, const SkDPoint& pt) { in uniqueAnswer()
217 SkDPoint cubicMidPt = fCubic.ptAtT(cubicMidT); in uniqueAnswer()
223 SkDPoint cPt = fCubic.ptAtT(cubicT); in uniqueAnswer()
236 SkDPoint calcPt = c.ptAtT(roots[index]); in VerticalIntersect()
256 SkDPoint pt = { axisIntercept, fCubic.ptAtT(cubicT).fY }; in verticalIntersect()
[all …]
DSkIntersections.cpp10 int SkIntersections::closestTo(double rangeStart, double rangeEnd, const SkDPoint& testPt, in closestTo()
18 const SkDPoint& iPt = fPt[index]; in closestTo()
34 int SkIntersections::insert(double one, double two, const SkDPoint& pt) { in insert()
98 void SkIntersections::insertNear(double one, double two, const SkDPoint& pt1, const SkDPoint& pt2) { in insertNear()
107 int SkIntersections::insertCoincident(double one, double two, const SkDPoint& pt) { in insertCoincident()
132 int SkIntersections::mostOutside(double rangeStart, double rangeEnd, const SkDPoint& origin) const { in mostOutside()
DSkDConicLineIntersection.cpp42 SkDPoint conicMidPt = fConic.ptAtT(conicMidT); in checkCoincident()
81 SkDPoint pt = fConic.ptAtT(conicT); in horizontalIntersect()
110 SkDEBUGCODE(SkDPoint conicPt = fConic.ptAtT(conicT)); in intersect()
111 SkDEBUGCODE(SkDPoint linePt = fLine->ptAtT(lineT)); in intersect()
115 SkDPoint pt; in intersect()
159 SkDPoint pt = fConic.ptAtT(conicT); in verticalIntersect()
272 SkDPoint xy = fConic.ptAtT(t); in findLineT()
281 bool pinTs(double* conicT, double* lineT, SkDPoint* pt, PinTPoint ptSet) { in pinTs()
296 if (SkDPoint::ApproximatelyEqual(gridPt, (*fLine)[0].asSkPoint())) { in pinTs()
299 } else if (SkDPoint::ApproximatelyEqual(gridPt, (*fLine)[1].asSkPoint())) { in pinTs()
[all …]
DSkDQuadLineIntersection.cpp120 SkDPoint quadMidPt = fQuad.ptAtT(quadMidT); in checkCoincident()
179 SkDPoint pt; in intersect()
207 SkDPoint pt = fQuad.ptAtT(quadT); in horizontalIntersect()
220 bool uniqueAnswer(double quadT, const SkDPoint& pt) { in uniqueAnswer()
231 SkDPoint quadMidPt = fQuad.ptAtT(quadMidT); in uniqueAnswer()
237 SkDPoint qPt = fQuad.ptAtT(quadT); in uniqueAnswer()
263 SkDPoint pt = fQuad.ptAtT(quadT); in verticalIntersect()
372 SkDPoint xy = fQuad.ptAtT(t); in findLineT()
381 bool pinTs(double* quadT, double* lineT, SkDPoint* pt, PinTPoint ptSet) { in pinTs()
396 if (SkDPoint::ApproximatelyEqual(gridPt, (*fLine)[0].asSkPoint())) { in pinTs()
[all …]
DSkPathOpsConic.cpp87 SkDPoint SkDConic::ptAtT(double t) const { in ptAtT()
95 SkDPoint result = { in ptAtT()
165 SkDPoint SkDConic::subDivide(const SkDPoint& a, const SkDPoint& c, double t1, double t2, in subDivide()
DSkPathOpsCubic.cpp19 void SkDCubic::align(int endIndex, int ctrlIndex, SkDPoint* dstPt) const { in align()
34 SkDPoint cubicAtT = ptAtT(t); in binarySearch()
40 SkDPoint lessPt = ptAtT(priorT); in binarySearch()
59 SkDPoint morePt = ptAtT(nextT); in binarySearch()
70 SkDPoint testAtT = ptAtT(t); in binarySearch()
149 bool SkDCubic::hullIntersects(const SkDPoint* pts, int ptCount, bool* isLinear) const { in hullIntersects()
155 const SkDPoint* endPt[2]; in hullIntersects()
283 SkDPoint pt = cubic.ptAtT(inflectionTs[index]); in ComplexBreak()
290 SkDPoint pt = cubic.ptAtT(maxCurvature[index]); in ComplexBreak()
343 void SkDCubic::otherPts(int index, const SkDPoint* o1Pts[kPointCount - 1]) const { in otherPts()
[all …]
DSkPathOpsRect.h15 void add(const SkDPoint& pt) { in add()
22 bool contains(const SkDPoint& pt) const { in contains()
37 void set(const SkDPoint& pt) { in set()
/external/skia/tests/
DPathOpsQuadIntersectionTest.cpp44 SkDPoint xy1 = quad1.ptAtT(tt1); in standardTestCases()
46 SkDPoint xy2 = quad2.ptAtT(tt2); in standardTestCases()
348 SkDPoint xy1 = quad1.ptAtT(tt1); in oneOffTest1()
350 SkDPoint xy2 = quad2.ptAtT(tt2); in oneOffTest1()
403 SkDPoint pt1 = quad1.ptAtT(tt1); in coincidentTestOne()
404 SkDPoint pt2 = quad2.ptAtT(tt2); in coincidentTestOne()
425 SkDPoint t1[3], t2[3]; in intersectionFinder()
472 SkDPoint test; in intersectionFinder()
498 SkDPoint p10 = quad1.ptAtT(t10); in intersectionFinder()
499 SkDPoint p1Seed = quad1.ptAtT(t1Seed); in intersectionFinder()
[all …]
DPathOpsCubicIntersectionTest.cpp59 SkDPoint xy1 = c1.ptAtT(tt1); in standardTestCases()
61 SkDPoint xy2 = c2.ptAtT(tt2); in standardTestCases()
418 SkDPoint xy1, xy2; in oneOff()
424 const SkDPoint& iPt = intersections.pt(pt3); in oneOff()
517 SkDPoint xy1 = c1.ptAtT(tt1); in CubicIntersection_RandTest()
519 SkDPoint xy2 = c2.ptAtT(tt2); in CubicIntersection_RandTest()
530 SkDPoint t1[3], t2[3]; in intersectionFinder()
580 SkDPoint test; in intersectionFinder()
606 SkDPoint p10 = c1.ptAtT(t10); in intersectionFinder()
607 SkDPoint p1Seed = c1.ptAtT(t1Seed); in intersectionFinder()
[all …]
DPathOpsCubicLineIntersectionIdeas.cpp21 SkDPoint p;
54 static double binary_search(const SkDCubic& cubic, double step, const SkDPoint& pt, double t, in binary_search()
59 SkDPoint cubicAtT = cubic.ptAtT(t); in binary_search()
76 SkDPoint lessPt = cubic.ptAtT(t - lastStep); in binary_search()
85 SkDPoint morePt = cubic.ptAtT(t + lastStep); in binary_search()
147 SkDPoint origin = {ran.nextRangeF(-1000, 1000), ran.nextRangeF(-1000, 1000)}; in DEF_TEST()
157 SkDPoint pt = cubic.ptAtT(t); in DEF_TEST()
173 SkDPoint calcPt = cubic.ptAtT(t); in DEF_TEST()
256 const SkDPoint& pt = failure.p; in testOneFailure()
266 SkDPoint calcPt = cubic.ptAtT(t); in testOneFailure()
DPathOpsDRectTest.cpp56 SkDPoint leftTop = {rect2.fLeft, rect2.fTop}; in DEF_TEST()
58 SkDPoint rightBottom = {rect2.fRight, rect2.fBottom}; in DEF_TEST()
70 SkDPoint leftTop = {rect2.fLeft, rect2.fTop}; in DEF_TEST()
72 SkDPoint rightBottom = {rect2.fRight, rect2.fBottom}; in DEF_TEST()
DPathOpsTestCommon.h17 SkDPoint fPts[kPointCount];
27 SkDPoint fPts[kPointCount];
37 bool ValidPoint(const SkDPoint& pt);
DPathOpsCubicLineIntersectionTest.cpp151 SkDPoint xy1 = cubic.ptAtT(tt1); in testOne()
153 SkDPoint xy2 = line.ptAtT(tt2); in testOne()
162 SkDPoint prev = cubic.ptAtT(cubicT * 2 - 1); in testOne()
163 SkDPoint sect = cubic.ptAtT(cubicT); in testOne()
166 SkDPoint prevL = line.ptAtT(i[1][0] - 0.0000007); in testOne()
168 SkDPoint nextL = line.ptAtT(i[1][0] + 0.0000007); in testOne()
DPathOpsQuadLineIntersectionTest.cpp19 SkDPoint expected[2];
92 SkDPoint quadXY = quad.ptAtT(quadT); in testOneOffs()
94 SkDPoint lineXY = line.ptAtT(lineT); in testOneOffs()
138 SkDPoint t1 = quad.ptAtT(tt1); in DEF_TEST()
141 SkDPoint t2 = line.ptAtT(tt2); in DEF_TEST()
DPathOpsConicLineIntersectionTest.cpp20 SkDPoint expected[2];
82 SkDPoint conicXY = conic.ptAtT(conicT); in testOneOffs()
84 SkDPoint lineXY = line.ptAtT(lineT); in testOneOffs()
133 SkDPoint t1 = conic.ptAtT(tt1); in DEF_TEST()
136 SkDPoint t2 = line.ptAtT(tt2); in DEF_TEST()
DPathOpsDPointTest.cpp11 static const SkDPoint tests[] = {
25 const SkDPoint& pt = tests[index]; in DEF_TEST()
27 SkDPoint p = pt; in DEF_TEST()

123