/external/skia/src/pathops/ |
D | SkPathOpsLine.h | 13 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 …]
|
D | SkPathOpsPoint.h | 80 struct SkDPoint { struct 89 friend SkDVector operator-(const SkDPoint& a, const SkDPoint& b); argument 91 friend bool operator==(const SkDPoint& a, const SkDPoint& b) { 95 friend bool operator!=(const SkDPoint& a, const SkDPoint& b) { 117 SkDPoint operator+(const SkDVector& v) { 118 SkDPoint result = *this; argument 124 SkDPoint operator-(const SkDVector& v) { 125 SkDPoint result = *this; argument 133 bool approximatelyEqual(const SkDPoint& a) const { in approximatelyEqual() argument 148 SkDPoint dA; in approximatelyEqual() argument [all …]
|
D | SkPathOpsQuad.h | 18 SkDPoint pts[5]; 26 SkDPoint fPts[kPointCount]; 57 const SkDPoint& operator[](int n) const { SkASSERT(n >= 0 && n < kPointCount); return fPts[n]; } 58 SkDPoint& operator[](int n) { SkASSERT(n >= 0 && n < kPointCount); return fPts[n]; } 61 void align(int endIndex, SkDPoint* dstPt) const; 78 void otherPts(int oddMan, const SkDPoint* endPt[2]) const; 79 SkDPoint ptAtT(double t) const; 89 SkDPoint subDivide(const SkDPoint& a, const SkDPoint& c, double t1, double t2) const; 90 static SkDPoint SubDivide(const SkPoint pts[kPointCount], const SkDPoint& a, const SkDPoint& c, in SubDivide()
|
D | SkPathOpsCubic.h | 17 SkDPoint pts[7]; 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]; } 49 void align(int endIndex, int ctrlIndex, SkDPoint* dstPt) const; 78 bool hullIntersects(const SkDPoint* pts, int ptCount, bool* isLinear) const; 82 void otherPts(int index, const SkDPoint* o1Pts[kPointCount - 1]) const; 83 SkDPoint ptAtT(double t) const; 116 void subDivide(const SkDPoint& a, const SkDPoint& d, double t1, double t2, SkDPoint p[2]) const; 118 …static void SubDivide(const SkPoint pts[kPointCount], const SkDPoint& a, const SkDPoint& d, double… in SubDivide() 119 double t2, SkDPoint p[2]) { in SubDivide() [all …]
|
D | SkPathOpsConic.h | 47 const SkDPoint& operator[](int n) const { return fPts[n]; } 48 SkDPoint& operator[](int n) { return fPts[n]; } 54 void align(int endIndex, SkDPoint* dstPt) const { in align() 83 void otherPts(int oddMan, const SkDPoint* endPt[2]) const { in otherPts() 87 SkDPoint ptAtT(double t) const; 105 SkDPoint subDivide(const SkDPoint& a, const SkDPoint& c, double t1, double t2, 108 static SkDPoint SubDivide(const SkPoint pts[kPointCount], SkScalar weight, in SubDivide() 109 const SkDPoint& a, const SkDPoint& c, in SubDivide()
|
D | SkPathOpsLine.cpp | 9 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 …]
|
D | SkIntersections.h | 110 int insertSwap(double one, double two, const SkDPoint& pt) { in insertSwap() 150 const SkDPoint& pt(int index) const { in pt() 154 const SkDPoint& pt2(int index) const { in pt2() 230 int closestTo(double rangeStart, double rangeEnd, const SkDPoint& testPt, double* dist) const; 231 void cubicInsert(double one, double two, const SkDPoint& pt, const SkDCubic& c1, 245 int insert(double one, double two, const SkDPoint& pt); 246 void insertNear(double one, double two, const SkDPoint& pt1, const SkDPoint& pt2); 248 int insertCoincident(double one, double two, const SkDPoint& pt); 264 int mostOutside(double rangeStart, double rangeEnd, const SkDPoint& origin) const; 302 SkDPoint fPt[12]; // FIXME: since scans store points as SkPoint, this should also [all …]
|
D | SkDCubicLineIntersection.cpp | 100 SkDPoint cubicMidPt = fCubic.ptAtT(cubicMidT); in checkCoincident() 131 SkDPoint calcPt = c.ptAtT(roots[index]); in intersectRay() 156 SkDPoint pt; in intersect() 171 SkDPoint calcPt = c.ptAtT(roots[index]); in HorizontalIntersect() 191 SkDPoint pt = { fCubic.ptAtT(cubicT).fX, axisIntercept }; in horizontalIntersect() 204 bool uniqueAnswer(double cubicT, const SkDPoint& pt) { in uniqueAnswer() 215 SkDPoint cubicMidPt = fCubic.ptAtT(cubicMidT); in uniqueAnswer() 221 SkDPoint cPt = fCubic.ptAtT(cubicT); in uniqueAnswer() 234 SkDPoint calcPt = c.ptAtT(roots[index]); in VerticalIntersect() 254 SkDPoint pt = { axisIntercept, fCubic.ptAtT(cubicT).fY }; in verticalIntersect() [all …]
|
D | SkPathOpsCurve.h | 57 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); 71 SkDPoint lineTop(const SkPoint[2], SkScalar , double , double , double* topT); 72 SkDPoint quadTop(const SkPoint curve[3], SkScalar , double s, double e, double* topT); 83 extern SkDPoint (SkDCurve::* const Top[])(const SkPoint curve[], SkScalar cWeight, 86 static SkDPoint dline_xy_at_t(const SkPoint a[2], SkScalar , double t) { in dline_xy_at_t() 92 static SkDPoint dquad_xy_at_t(const SkPoint a[3], SkScalar , double t) { in dquad_xy_at_t() 98 static SkDPoint dconic_xy_at_t(const SkPoint a[3], SkScalar weight, double t) { in dconic_xy_at_t() [all …]
|
D | SkDConicLineIntersection.cpp | 41 SkDPoint conicMidPt = fConic.ptAtT(conicMidT); in checkCoincident() 80 SkDPoint pt = fConic.ptAtT(conicT); in horizontalIntersect() 106 SkDEBUGCODE(SkDPoint conicPt = fConic.ptAtT(conicT)); in intersect() 107 SkDEBUGCODE(SkDPoint linePt = fLine->ptAtT(lineT)); in intersect() 109 SkDPoint pt; in intersect() 153 SkDPoint pt = fConic.ptAtT(conicT); in verticalIntersect() 251 SkDPoint xy = fConic.ptAtT(t); in findLineT() 260 bool pinTs(double* conicT, double* lineT, SkDPoint* pt, PinTPoint ptSet) { in pinTs() 275 if (SkDPoint::ApproximatelyEqual(gridPt, (*fLine)[0].asSkPoint())) { in pinTs() 278 } else if (SkDPoint::ApproximatelyEqual(gridPt, (*fLine)[1].asSkPoint())) { in pinTs() [all …]
|
D | SkIntersections.cpp | 10 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() 94 void SkIntersections::insertNear(double one, double two, const SkDPoint& pt1, const SkDPoint& pt2) { in insertNear() 103 int SkIntersections::insertCoincident(double one, double two, const SkDPoint& pt) { in insertCoincident() 128 int SkIntersections::mostOutside(double rangeStart, double rangeEnd, const SkDPoint& origin) const { in mostOutside()
|
D | SkDQuadLineIntersection.cpp | 119 SkDPoint quadMidPt = fQuad.ptAtT(quadMidT); in checkCoincident() 178 SkDPoint pt; in intersect() 206 SkDPoint pt = fQuad.ptAtT(quadT); in horizontalIntersect() 219 bool uniqueAnswer(double quadT, const SkDPoint& pt) { in uniqueAnswer() 230 SkDPoint quadMidPt = fQuad.ptAtT(quadMidT); in uniqueAnswer() 236 SkDPoint qPt = fQuad.ptAtT(quadT); in uniqueAnswer() 262 SkDPoint pt = fQuad.ptAtT(quadT); in verticalIntersect() 356 SkDPoint xy = fQuad.ptAtT(t); in findLineT() 365 bool pinTs(double* quadT, double* lineT, SkDPoint* pt, PinTPoint ptSet) { in pinTs() 380 if (SkDPoint::ApproximatelyEqual(gridPt, (*fLine)[0].asSkPoint())) { in pinTs() [all …]
|
D | SkPathOpsQuad.cpp | 24 const SkDPoint* endPt[2]; in hullIntersects() 68 void SkDQuad::otherPts(int oddMan, const SkDPoint* endPt[2]) const { in otherPts() 177 SkDPoint SkDQuad::ptAtT(double t) const { in ptAtT() 188 SkDPoint result = { a * fPts[0].fX + b * fPts[1].fX + c * fPts[2].fX, in ptAtT() 245 void SkDQuad::align(int endIndex, SkDPoint* dstPt) const { in align() 254 SkDPoint SkDQuad::subDivide(const SkDPoint& a, const SkDPoint& c, double t1, double t2) const { in subDivide() 256 SkDPoint b; in subDivide() 266 b = SkDPoint::Mid(b0[1], b1[1]); in subDivide()
|
D | SkPathOpsCubic.cpp | 19 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() 152 bool SkDCubic::hullIntersects(const SkDPoint* pts, int ptCount, bool* isLinear) const { in hullIntersects() 158 const SkDPoint* endPt[2]; in hullIntersects() 264 SkDPoint pt = cubic.ptAtT(inflectionTs[index]); in ComplexBreak() 271 SkDPoint pt = cubic.ptAtT(maxCurvature[index]); in ComplexBreak() 301 void SkDCubic::otherPts(int index, const SkDPoint* o1Pts[kPointCount - 1]) const { in otherPts() [all …]
|
D | SkPathOpsConic.cpp | 84 SkDPoint SkDConic::ptAtT(double t) const { in ptAtT() 92 SkDPoint result = { in ptAtT() 161 SkDPoint SkDConic::subDivide(const SkDPoint& a, const SkDPoint& c, double t1, double t2, in subDivide()
|
D | SkPathOpsRect.h | 15 void add(const SkDPoint& pt) { in add() 22 bool contains(const SkDPoint& pt) const { in contains() 37 void set(const SkDPoint& pt) { in set()
|
D | SkPathOpsPoint.cpp | 9 SkDVector operator-(const SkDPoint& a, const SkDPoint& b) { in operator -()
|
/external/skia/tests/ |
D | PathOpsQuadIntersectionTest.cpp | 40 SkDPoint xy1 = quad1.ptAtT(tt1); in standardTestCases() 42 SkDPoint xy2 = quad2.ptAtT(tt2); in standardTestCases() 334 SkDPoint xy1 = quad1.ptAtT(tt1); in oneOffTest1() 336 SkDPoint xy2 = quad2.ptAtT(tt2); in oneOffTest1() 385 SkDPoint pt1 = quad1.ptAtT(tt1); in coincidentTestOne() 386 SkDPoint pt2 = quad2.ptAtT(tt2); in coincidentTestOne() 405 SkDPoint t1[3], t2[3]; in intersectionFinder() 452 SkDPoint test; in intersectionFinder() 478 SkDPoint p10 = quad1.ptAtT(t10); in intersectionFinder() 479 SkDPoint p1Seed = quad1.ptAtT(t1Seed); in intersectionFinder() [all …]
|
D | PathOpsCubicLineIntersectionIdeas.cpp | 21 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() 155 SkDPoint pt = cubic.ptAtT(t); in DEF_TEST() 171 SkDPoint calcPt = cubic.ptAtT(t); in DEF_TEST() 252 const SkDPoint& pt = failure.p; in testOneFailure() 262 SkDPoint calcPt = cubic.ptAtT(t); in testOneFailure()
|
D | PathOpsCubicIntersectionTest.cpp | 56 SkDPoint xy1 = cubic1.ptAtT(tt1); in standardTestCases() 58 SkDPoint xy2 = cubic2.ptAtT(tt2); in standardTestCases() 409 SkDPoint xy1, xy2; in oneOff() 415 const SkDPoint& iPt = intersections.pt(pt3); in oneOff() 505 SkDPoint xy1 = cubic1.ptAtT(tt1); in CubicIntersection_RandTest() 507 SkDPoint xy2 = cubic2.ptAtT(tt2); in CubicIntersection_RandTest() 518 SkDPoint t1[3], t2[3]; in intersectionFinder() 565 SkDPoint test; in intersectionFinder() 591 SkDPoint p10 = cubic1.ptAtT(t10); in intersectionFinder() 592 SkDPoint p1Seed = cubic1.ptAtT(t1Seed); in intersectionFinder() [all …]
|
D | PathOpsDRectTest.cpp | 54 SkDPoint leftTop = {rect2.fLeft, rect2.fTop}; in DEF_TEST() 56 SkDPoint rightBottom = {rect2.fRight, rect2.fBottom}; in DEF_TEST() 66 SkDPoint leftTop = {rect2.fLeft, rect2.fTop}; in DEF_TEST() 68 SkDPoint rightBottom = {rect2.fRight, rect2.fBottom}; in DEF_TEST()
|
D | PathOpsCubicLineIntersectionTest.cpp | 147 SkDPoint xy1 = cubic.ptAtT(tt1); in testOne() 149 SkDPoint xy2 = line.ptAtT(tt2); in testOne() 158 SkDPoint prev = cubic.ptAtT(cubicT * 2 - 1); in testOne() 159 SkDPoint sect = cubic.ptAtT(cubicT); in testOne() 162 SkDPoint prevL = line.ptAtT(i[1][0] - 0.0000007); in testOne() 164 SkDPoint nextL = line.ptAtT(i[1][0] + 0.0000007); in testOne()
|
D | PathOpsQuadLineIntersectionTest.cpp | 19 SkDPoint expected[2]; 90 SkDPoint quadXY = quad.ptAtT(quadT); in testOneOffs() 92 SkDPoint lineXY = line.ptAtT(lineT); in testOneOffs() 134 SkDPoint t1 = quad.ptAtT(tt1); in DEF_TEST() 137 SkDPoint t2 = line.ptAtT(tt2); in DEF_TEST()
|
D | PathOpsConicLineIntersectionTest.cpp | 19 SkDPoint expected[2]; 79 SkDPoint conicXY = conic.ptAtT(conicT); in testOneOffs() 81 SkDPoint lineXY = line.ptAtT(lineT); in testOneOffs() 126 SkDPoint t1 = conic.ptAtT(tt1); in DEF_TEST() 129 SkDPoint t2 = line.ptAtT(tt2); in DEF_TEST()
|
D | PathOpsDPointTest.cpp | 11 static const SkDPoint tests[] = { 25 const SkDPoint& pt = tests[index]; in DEF_TEST() 27 SkDPoint p = pt; in DEF_TEST()
|