Home
last modified time | relevance | path

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

12345

/third_party/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.h19 SkDPoint pts[5];
27 SkDPoint fPts[kPointCount];
44 void debugSet(const SkDPoint* pts);
62 const SkDPoint& operator[](int n) const { SkASSERT(n >= 0 && n < kPointCount); return fPts[n]; }
63 SkDPoint& operator[](int n) { SkASSERT(n >= 0 && n < kPointCount); return fPts[n]; }
66 void align(int endIndex, SkDPoint* dstPt) const;
88 void otherPts(int oddMan, const SkDPoint* endPt[2]) const;
91 SkDPoint ptAtT(double t) const;
103 SkDPoint subDivide(const SkDPoint& a, const SkDPoint& c, double t1, double t2) const;
104 static SkDPoint SubDivide(const SkPoint pts[kPointCount], const SkDPoint& a, const SkDPoint& c, in SubDivide()
[all …]
DSkPathOpsCubic.h43 const SkDPoint& operator[](int n) const { SkASSERT(n >= 0 && n < kPointCount); return fPts[n]; }
44 SkDPoint& operator[](int n) { SkASSERT(n >= 0 && n < kPointCount); return fPts[n]; }
46 void align(int endIndex, int ctrlIndex, SkDPoint* dstPt) const;
58 void debugSet(const SkDPoint* pts);
82 bool hullIntersects(const SkDPoint* pts, int ptCount, bool* isLinear) const;
87 void otherPts(int index, const SkDPoint* o1Pts[kPointCount - 1]) const;
90 SkDPoint ptAtT(double t) const;
128 void subDivide(const SkDPoint& a, const SkDPoint& d, double t1, double t2, SkDPoint p[2]) const;
130 …static void SubDivide(const SkPoint pts[kPointCount], const SkDPoint& a, const SkDPoint& d, double… in SubDivide()
131 double t2, SkDPoint p[2]) { in SubDivide()
[all …]
DSkPathOpsPoint.h100 struct SkDPoint { struct
109 friend SkDVector operator-(const SkDPoint& a, const SkDPoint& b) { argument
113 friend bool operator==(const SkDPoint& a, const SkDPoint& b) {
117 friend bool operator!=(const SkDPoint& a, const SkDPoint& b) {
139 SkDPoint operator+(const SkDVector& v) {
140 SkDPoint result = *this; argument
146 SkDPoint operator-(const SkDVector& v) {
147 SkDPoint result = *this; argument
155 bool approximatelyDEqual(const SkDPoint& a) const { in approximatelyDEqual() argument
170 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()
93 void otherPts(int oddMan, const SkDPoint* endPt[2]) const { in otherPts()
99 SkDPoint ptAtT(double t) const;
118 SkDPoint subDivide(const SkDPoint& a, const SkDPoint& c, double t1, double t2,
121 static SkDPoint SubDivide(const SkPoint pts[kPointCount], SkScalar weight, in SubDivide()
122 const SkDPoint& a, const SkDPoint& c, in SubDivide()
148 const SkDPoint& operator[](int n) const override { return fConic[n]; }
[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 …]
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 …]
DSkPathOpsQuad.cpp15 static bool pointInTriangle(const SkDPoint fPts[3], const SkDPoint& test) { in pointInTriangle()
35 static bool matchesEnd(const SkDPoint fPts[3], const SkDPoint& test) { in matchesEnd()
50 const SkDPoint* endPt[2]; in hullIntersects()
102 void SkDQuad::otherPts(int oddMan, const SkDPoint* endPt[2]) const { in otherPts()
217 SkDPoint SkDQuad::ptAtT(double t) const { in ptAtT()
228 SkDPoint result = { a * fPts[0].fX + b * fPts[1].fX + c * fPts[2].fX, in ptAtT()
294 void SkDQuad::align(int endIndex, SkDPoint* dstPt) const { in align()
303 SkDPoint SkDQuad::subDivide(const SkDPoint& a, const SkDPoint& c, double t1, double t2) const { in subDivide()
305 SkDPoint b; in subDivide()
315 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);
277 int mostOutside(double rangeStart, double rangeEnd, const SkDPoint& origin) const;
315 SkDPoint fPt[13]; // FIXME: since scans store points as SkPoint, this should also
[all …]
/third_party/flutter/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 …]
DSkPathOpsPoint.h100 struct SkDPoint { struct
109 friend SkDVector operator-(const SkDPoint& a, const SkDPoint& b) { argument
113 friend bool operator==(const SkDPoint& a, const SkDPoint& b) {
117 friend bool operator!=(const SkDPoint& a, const SkDPoint& b) {
139 SkDPoint operator+(const SkDVector& v) {
140 SkDPoint result = *this; argument
146 SkDPoint operator-(const SkDVector& v) {
147 SkDPoint result = *this; argument
155 bool approximatelyDEqual(const SkDPoint& a) const { in approximatelyDEqual() argument
170 SkDPoint dA; in approximatelyDEqual() argument
[all …]
DSkPathOpsQuad.h19 SkDPoint pts[5];
27 SkDPoint fPts[kPointCount];
44 void debugSet(const SkDPoint* pts);
62 const SkDPoint& operator[](int n) const { SkASSERT(n >= 0 && n < kPointCount); return fPts[n]; }
63 SkDPoint& operator[](int n) { SkASSERT(n >= 0 && n < kPointCount); return fPts[n]; }
66 void align(int endIndex, SkDPoint* dstPt) const;
88 void otherPts(int oddMan, const SkDPoint* endPt[2]) const;
91 SkDPoint ptAtT(double t) const;
103 SkDPoint subDivide(const SkDPoint& a, const SkDPoint& c, double t1, double t2) const;
104 static SkDPoint SubDivide(const SkPoint pts[kPointCount], const SkDPoint& a, const SkDPoint& c, in SubDivide()
[all …]
DSkPathOpsCubic.h43 const SkDPoint& operator[](int n) const { SkASSERT(n >= 0 && n < kPointCount); return fPts[n]; }
44 SkDPoint& operator[](int n) { SkASSERT(n >= 0 && n < kPointCount); return fPts[n]; }
46 void align(int endIndex, int ctrlIndex, SkDPoint* dstPt) const;
58 void debugSet(const SkDPoint* pts);
82 bool hullIntersects(const SkDPoint* pts, int ptCount, bool* isLinear) const;
87 void otherPts(int index, const SkDPoint* o1Pts[kPointCount - 1]) const;
90 SkDPoint ptAtT(double t) const;
128 void subDivide(const SkDPoint& a, const SkDPoint& d, double t1, double t2, SkDPoint p[2]) const;
130 …static void SubDivide(const SkPoint pts[kPointCount], const SkDPoint& a, const SkDPoint& d, double… in SubDivide()
131 double t2, SkDPoint p[2]) { in SubDivide()
[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()
93 void otherPts(int oddMan, const SkDPoint* endPt[2]) const { in otherPts()
99 SkDPoint ptAtT(double t) const;
118 SkDPoint subDivide(const SkDPoint& a, const SkDPoint& c, double t1, double t2,
121 static SkDPoint SubDivide(const SkPoint pts[kPointCount], SkScalar weight, in SubDivide()
122 const SkDPoint& a, const SkDPoint& c, in SubDivide()
148 const SkDPoint& operator[](int n) const override { return fConic[n]; }
[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 …]
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 …]
DSkPathOpsQuad.cpp15 static bool pointInTriangle(const SkDPoint fPts[3], const SkDPoint& test) { in pointInTriangle()
35 static bool matchesEnd(const SkDPoint fPts[3], const SkDPoint& test) { in matchesEnd()
50 const SkDPoint* endPt[2]; in hullIntersects()
102 void SkDQuad::otherPts(int oddMan, const SkDPoint* endPt[2]) const { in otherPts()
217 SkDPoint SkDQuad::ptAtT(double t) const { in ptAtT()
228 SkDPoint result = { a * fPts[0].fX + b * fPts[1].fX + c * fPts[2].fX, in ptAtT()
294 void SkDQuad::align(int endIndex, SkDPoint* dstPt) const { in align()
303 SkDPoint SkDQuad::subDivide(const SkDPoint& a, const SkDPoint& c, double t1, double t2) const { in subDivide()
305 SkDPoint b; in subDivide()
315 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);
277 int mostOutside(double rangeStart, double rangeEnd, const SkDPoint& origin) const;
315 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 …]
/third_party/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.cpp61 SkDPoint xy1 = c1.ptAtT(tt1); in standardTestCases()
63 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()
/third_party/flutter/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()
419 SkDPoint xy1, xy2; in oneOff()
425 const SkDPoint& iPt = intersections.pt(pt3); in oneOff()
518 SkDPoint xy1 = c1.ptAtT(tt1); in CubicIntersection_RandTest()
520 SkDPoint xy2 = c2.ptAtT(tt2); in CubicIntersection_RandTest()
531 SkDPoint t1[3], t2[3]; in intersectionFinder()
581 SkDPoint test; in intersectionFinder()
607 SkDPoint p10 = c1.ptAtT(t10); in intersectionFinder()
608 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()

12345