Home
last modified time | relevance | path

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

123

/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 …]
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 …]
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 …]
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()
107 void SkIntersections::insertNear(double one, double two, const SkDPoint& pt1, const SkDPoint& pt2) { in insertNear()
116 int SkIntersections::insertCoincident(double one, double two, const SkDPoint& pt) { in insertCoincident()
141 int SkIntersections::mostOutside(double rangeStart, double rangeEnd, const SkDPoint& origin) const { in mostOutside()
DSkPathOpsTSect.h64 const SkDPoint& perpPt() const { in perpPt()
72 void setPerp(const SkTCurve& c1, double t, const SkDPoint& cPt, const SkTCurve& );
75 SkDPoint fPerpPt;
95 double closestBoundedT(const SkDPoint& pt) const;
153 double linearT(const SkDPoint& ) const;
175 const SkDPoint& pointFirst() const { in pointFirst()
179 const SkDPoint& pointLast() const { in pointLast()
221 void validatePerpPt(double t, const SkDPoint& ) const;
326 const SkDPoint& pointLast() const { in pointLast()
DSkPathOpsTCurve.h19 virtual const SkDPoint& operator[](int n) const = 0;
20 virtual SkDPoint& operator[](int n) = 0;
37 virtual void otherPts(int oddMan, const SkDPoint* endPt[2]) const = 0;
40 virtual SkDPoint ptAtT(double t) const = 0;
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 …]
DSkPathOpsCubic.cpp20 void SkDCubic::align(int endIndex, int ctrlIndex, SkDPoint* dstPt) const { in align()
35 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()
274 SkDPoint pt = cubic.ptAtT(inflectionTs[index]); in ComplexBreak()
281 SkDPoint pt = cubic.ptAtT(maxCurvature[index]); in ComplexBreak()
335 void SkDCubic::otherPts(int index, const SkDPoint* o1Pts[kPointCount - 1]) const { in otherPts()
[all …]
DSkPathOpsConic.cpp88 SkDPoint SkDConic::ptAtT(double t) const { in ptAtT()
96 SkDPoint result = { in ptAtT()
169 SkDPoint SkDConic::subDivide(const SkDPoint& a, const SkDPoint& c, double t1, double t2, in subDivide()
/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()
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()
DPathOpsCubicLineIntersectionTest.cpp155 SkDPoint xy1 = cubic.ptAtT(tt1); in testOne()
157 SkDPoint xy2 = line.ptAtT(tt2); in testOne()
166 SkDPoint prev = cubic.ptAtT(cubicT * 2 - 1); in testOne()
167 SkDPoint sect = cubic.ptAtT(cubicT); in testOne()
170 SkDPoint prevL = line.ptAtT(i[1][0] - 0.0000007); in testOne()
172 SkDPoint nextL = line.ptAtT(i[1][0] + 0.0000007); in testOne()
DPathOpsTestCommon.h17 SkDPoint fPts[kPointCount];
27 SkDPoint fPts[kPointCount];
37 bool ValidPoint(const SkDPoint& pt);
DPathOpsQuadLineIntersectionTest.cpp21 SkDPoint expected[2];
96 SkDPoint quadXY = quad.ptAtT(quadT); in testOneOffs()
98 SkDPoint lineXY = line.ptAtT(lineT); in testOneOffs()
141 SkDPoint t1 = quad.ptAtT(tt1); in DEF_TEST()
144 SkDPoint t2 = line.ptAtT(tt2); in DEF_TEST()
DPathOpsConicLineIntersectionTest.cpp22 SkDPoint expected[2];
86 SkDPoint conicXY = conic.ptAtT(conicT); in testOneOffs()
88 SkDPoint lineXY = line.ptAtT(lineT); in testOneOffs()
136 SkDPoint t1 = conic.ptAtT(tt1); in DEF_TEST()
139 SkDPoint t2 = line.ptAtT(tt2); in DEF_TEST()

123