/third_party/flutter/skia/src/pathops/ |
D | SkPathOpsPoint.h | 14 return AlmostEqualUlps(pt1.fX, pt2.fX) && AlmostEqualUlps(pt1.fY, pt2.fY); in AlmostEqualUlps() 18 double fX; member 22 fX = pt.fX; in set() 29 fX += v.fX; 35 fX -= v.fX; 41 fX /= s; 47 fX *= s; 52 SkVector v = {SkDoubleToScalar(fX), SkDoubleToScalar(fY)}; in asSkVector() 58 return fX * a.fY - fY * a.fX; in cross() 64 double xy = fX * a.fY; in crossCheck() [all …]
|
D | SkPathOpsLine.cpp | 17 SkDPoint result = { one_t * fPts[0].fX + t * fPts[1].fX, one_t * fPts[0].fY + t * fPts[1].fY }; in ptAtT() 32 if (!AlmostBetweenUlps(fPts[0].fX, xy.fX, fPts[1].fX) in nearPoint() 38 double denom = len.fX * len.fX + len.fY * len.fY; // see DLine intersectRay in nearPoint() 40 double numer = len.fX * ab0.fX + ab0.fY * len.fY; in nearPoint() 51 double tiniest = SkTMin(SkTMin(SkTMin(fPts[0].fX, fPts[0].fY), fPts[1].fX), fPts[1].fY); in nearPoint() 52 double largest = SkTMax(SkTMax(SkTMax(fPts[0].fX, fPts[0].fY), fPts[1].fX), fPts[1].fY); in nearPoint() 68 double denom = len.fX * len.fX + len.fY * len.fY; // see DLine intersectRay in nearRay() 70 double numer = len.fX * ab0.fX + ab0.fY * len.fY; in nearRay() 75 double tiniest = SkTMin(SkTMin(SkTMin(fPts[0].fX, fPts[0].fY), fPts[1].fX), fPts[1].fY); in nearRay() 76 double largest = SkTMax(SkTMax(SkTMax(fPts[0].fX, fPts[0].fY), fPts[1].fX), fPts[1].fY); in nearRay() [all …]
|
D | SkPathOpsCubic.cpp | 20 if (fPts[endIndex].fX == fPts[ctrlIndex].fX) { in align() 21 dstPt->fX = fPts[endIndex].fX; in align() 35 double calcPos = (&cubicAtT.fX)[xAxis]; in binarySearch() 40 if (approximately_equal_half(lessPt.fX, cubicAtT.fX) in binarySearch() 44 double lessDist = (&lessPt.fX)[xAxis] - axisIntercept; in binarySearch() 59 if (approximately_equal_half(morePt.fX, cubicAtT.fX) in binarySearch() 63 double moreDist = (&morePt.fX)[xAxis] - axisIntercept; in binarySearch() 71 calcPos = (&cubicAtT.fX)[xAxis]; in binarySearch() 106 dst.pts[1].fX = (fPts[0].fX + fPts[1].fX) / 2; in chopAt() 108 dst.pts[2].fX = (fPts[0].fX + 2 * fPts[1].fX + fPts[2].fX) / 4; in chopAt() [all …]
|
D | SkPathOpsQuad.cpp | 52 double origX = endPt[0]->fX; in hullIntersects() 54 double adj = endPt[1]->fX - origX; in hullIntersects() 56 double sign = (fPts[oddMan].fY - origY) * adj - (fPts[oddMan].fX - origX) * opp; in hullIntersects() 63 double test = (q2[n].fY - origY) * adj - (q2[n].fX - origX) * opp; in hullIntersects() 191 double tiniest = SkTMin(SkTMin(SkTMin(SkTMin(SkTMin(fPts[0].fX, fPts[0].fY), in isLinear() 192 fPts[1].fX), fPts[1].fY), fPts[2].fX), fPts[2].fY); in isLinear() 193 double largest = SkTMax(SkTMax(SkTMax(SkTMax(SkTMax(fPts[0].fX, fPts[0].fY), in isLinear() 194 fPts[1].fX), fPts[1].fY), fPts[2].fX), fPts[2].fY); in isLinear() 203 SkDVector result = { a * fPts[0].fX + b * fPts[1].fX + c * fPts[2].fX, in dxdyAtT() 205 if (result.fX == 0 && result.fY == 0) { in dxdyAtT() [all …]
|
D | SkLineParameters.h | 73 fB = pts[e].fX - pts[s].fX; in cubicEndPoints() 74 fC = pts[s].fX * pts[e].fY - pts[e].fX * pts[s].fY; in cubicEndPoints() 87 fB = pts[1].fX - pts[0].fX; in lineEndPoints() 88 fC = pts[0].fX * pts[1].fY - pts[1].fX * pts[0].fY; in lineEndPoints() 112 fB = pts[e].fX - pts[s].fX; in quadEndPoints() 113 fC = pts[s].fX * pts[e].fY - pts[e].fX * pts[s].fY; in quadEndPoints() 141 distance[index].fX = index * oneThird; in cubicDistanceY() 142 distance[index].fY = fA * pts[index].fX + fB * pts[index].fY + fC; in cubicDistanceY() 149 distance[index].fX = index * oneHalf; in quadDistanceY() 150 distance[index].fY = fA * pts[index].fX + fB * pts[index].fY + fC; in quadDistanceY() [all …]
|
/third_party/skia/src/pathops/ |
D | SkPathOpsPoint.h | 14 return AlmostEqualUlps(pt1.fX, pt2.fX) && AlmostEqualUlps(pt1.fY, pt2.fY); in AlmostEqualUlps() 18 double fX; member 22 fX = pt.fX; in set() 29 fX += v.fX; 35 fX -= v.fX; 41 fX /= s; 47 fX *= s; 52 SkVector v = {SkDoubleToScalar(fX), SkDoubleToScalar(fY)}; in asSkVector() 58 return fX * a.fY - fY * a.fX; in cross() 64 double xy = fX * a.fY; in crossCheck() [all …]
|
D | SkPathOpsLine.cpp | 17 SkDPoint result = { one_t * fPts[0].fX + t * fPts[1].fX, one_t * fPts[0].fY + t * fPts[1].fY }; in ptAtT() 32 if (!AlmostBetweenUlps(fPts[0].fX, xy.fX, fPts[1].fX) in nearPoint() 38 double denom = len.fX * len.fX + len.fY * len.fY; // see DLine intersectRay in nearPoint() 40 double numer = len.fX * ab0.fX + ab0.fY * len.fY; in nearPoint() 51 double tiniest = std::min(std::min(std::min(fPts[0].fX, fPts[0].fY), fPts[1].fX), fPts[1].fY); in nearPoint() 52 double largest = std::max(std::max(std::max(fPts[0].fX, fPts[0].fY), fPts[1].fX), fPts[1].fY); in nearPoint() 68 double denom = len.fX * len.fX + len.fY * len.fY; // see DLine intersectRay in nearRay() 70 double numer = len.fX * ab0.fX + ab0.fY * len.fY; in nearRay() 75 double tiniest = std::min(std::min(std::min(fPts[0].fX, fPts[0].fY), fPts[1].fX), fPts[1].fY); in nearRay() 76 double largest = std::max(std::max(std::max(fPts[0].fX, fPts[0].fY), fPts[1].fX), fPts[1].fY); in nearRay() [all …]
|
D | SkPathOpsCubic.cpp | 21 if (fPts[endIndex].fX == fPts[ctrlIndex].fX) { in align() 22 dstPt->fX = fPts[endIndex].fX; in align() 36 double calcPos = (&cubicAtT.fX)[xAxis]; in binarySearch() 41 if (approximately_equal_half(lessPt.fX, cubicAtT.fX) in binarySearch() 45 double lessDist = (&lessPt.fX)[xAxis] - axisIntercept; in binarySearch() 60 if (approximately_equal_half(morePt.fX, cubicAtT.fX) in binarySearch() 64 double moreDist = (&morePt.fX)[xAxis] - axisIntercept; in binarySearch() 72 calcPos = (&cubicAtT.fX)[xAxis]; in binarySearch() 107 dst.pts[1].fX = (fPts[0].fX + fPts[1].fX) / 2; in chopAt() 109 dst.pts[2].fX = (fPts[0].fX + 2 * fPts[1].fX + fPts[2].fX) / 4; in chopAt() [all …]
|
D | SkPathOpsQuad.cpp | 52 double origX = endPt[0]->fX; in hullIntersects() 54 double adj = endPt[1]->fX - origX; in hullIntersects() 56 double sign = (fPts[oddMan].fY - origY) * adj - (fPts[oddMan].fX - origX) * opp; in hullIntersects() 63 double test = (q2[n].fY - origY) * adj - (q2[n].fX - origX) * opp; in hullIntersects() 191 double tiniest = std::min(std::min(std::min(std::min(std::min(fPts[0].fX, fPts[0].fY), in isLinear() 192 fPts[1].fX), fPts[1].fY), fPts[2].fX), fPts[2].fY); in isLinear() 193 double largest = std::max(std::max(std::max(std::max(std::max(fPts[0].fX, fPts[0].fY), in isLinear() 194 fPts[1].fX), fPts[1].fY), fPts[2].fX), fPts[2].fY); in isLinear() 203 SkDVector result = { a * fPts[0].fX + b * fPts[1].fX + c * fPts[2].fX, in dxdyAtT() 205 if (result.fX == 0 && result.fY == 0) { in dxdyAtT() [all …]
|
D | SkLineParameters.h | 73 fB = pts[e].fX - pts[s].fX; in cubicEndPoints() 74 fC = pts[s].fX * pts[e].fY - pts[e].fX * pts[s].fY; in cubicEndPoints() 87 fB = pts[1].fX - pts[0].fX; in lineEndPoints() 88 fC = pts[0].fX * pts[1].fY - pts[1].fX * pts[0].fY; in lineEndPoints() 112 fB = pts[e].fX - pts[s].fX; in quadEndPoints() 113 fC = pts[s].fX * pts[e].fY - pts[e].fX * pts[s].fY; in quadEndPoints() 141 distance[index].fX = index * oneThird; in cubicDistanceY() 142 distance[index].fY = fA * pts[index].fX + fB * pts[index].fY + fC; in cubicDistanceY() 149 distance[index].fX = index * oneHalf; in quadDistanceY() 150 distance[index].fY = fA * pts[index].fX + fB * pts[index].fY + fC; in quadDistanceY() [all …]
|
/third_party/flutter/skia/include/core/ |
D | SkPoint.h | 26 int32_t fX; //!< x-axis value member 43 int32_t x() const { return fX; } in x() 55 bool isZero() const { return (fX | fY) == 0; } in isZero() 63 fX = x; in set() 72 return {-fX, -fY}; 80 fX = Sk32_sat_add(fX, v.fX); 89 fX = Sk32_sat_sub(fX, v.fX); 100 return fX == x && fY == y; in equals() 110 return a.fX == b.fX && a.fY == b.fY; 120 return a.fX != b.fX || a.fY != b.fY; [all …]
|
D | SkPoint3.h | 14 SkScalar fX, fY, fZ; member 22 SkScalar x() const { return fX; } in x() 26 void set(SkScalar x, SkScalar y, SkScalar z) { fX = x; fY = y; fZ = z; } in set() 29 return a.fX == b.fX && a.fY == b.fY && a.fZ == b.fZ; 42 SkScalar length() const { return SkPoint3::Length(fX, fY, fZ); } in length() 54 p.set(scale * fX, scale * fY, scale * fZ); in makeScale() 61 fX *= value; in scale() 71 neg.fX = -fX; 82 v.set(a.fX - b.fX, a.fY - b.fY, a.fZ - b.fZ); 90 v.set(a.fX + b.fX, a.fY + b.fY, a.fZ + b.fZ); [all …]
|
/third_party/skia/include/core/ |
D | SkPoint.h | 26 int32_t fX; //!< x-axis value member 43 constexpr int32_t x() const { return fX; } in x() 55 bool isZero() const { return (fX | fY) == 0; } in isZero() 63 fX = x; in set() 72 return {-fX, -fY}; 80 fX = Sk32_sat_add(fX, v.fX); 89 fX = Sk32_sat_sub(fX, v.fX); 100 return fX == x && fY == y; in equals() 110 return a.fX == b.fX && a.fY == b.fY; 120 return a.fX != b.fX || a.fY != b.fY; [all …]
|
D | SkPoint3.h | 14 SkScalar fX, fY, fZ; member 22 SkScalar x() const { return fX; } in x() 26 void set(SkScalar x, SkScalar y, SkScalar z) { fX = x; fY = y; fZ = z; } in set() 29 return a.fX == b.fX && a.fY == b.fY && a.fZ == b.fZ; 42 SkScalar length() const { return SkPoint3::Length(fX, fY, fZ); } in length() 54 p.set(scale * fX, scale * fY, scale * fZ); in makeScale() 61 fX *= value; in scale() 71 neg.fX = -fX; 81 return { a.fX - b.fX, a.fY - b.fY, a.fZ - b.fZ }; 87 return { a.fX + b.fX, a.fY + b.fY, a.fZ + b.fZ }; [all …]
|
/third_party/skia/gm/ |
D | gradients_2pt_conical.cpp | 56 SkScalar radius0 = (pts[1].fX - pts[0].fX) / 10; in Make2ConicalOutside() 57 SkScalar radius1 = (pts[1].fX - pts[0].fX) / 3; in Make2ConicalOutside() 58 center0.set(pts[0].fX + radius0, pts[0].fY + radius0); in Make2ConicalOutside() 59 center1.set(pts[1].fX - radius1, pts[1].fY - radius1); in Make2ConicalOutside() 67 SkScalar radius = (pts[1].fX - pts[0].fX) / 3; in Make2ConicalOutsideStrip() 68 center0.set(pts[0].fX, pts[0].fY); in Make2ConicalOutsideStrip() 69 center1.set(pts[1].fX, pts[1].fY); in Make2ConicalOutsideStrip() 77 SkScalar radius0 = (pts[1].fX - pts[0].fX) / 10; in Make2ConicalOutsideFlip() 78 SkScalar radius1 = (pts[1].fX - pts[0].fX) / 3; in Make2ConicalOutsideFlip() 79 center0.set(pts[0].fX + radius0, pts[0].fY + radius0); in Make2ConicalOutsideFlip() [all …]
|
/third_party/flutter/skia/gm/ |
D | gradients_2pt_conical.cpp | 56 SkScalar radius0 = (pts[1].fX - pts[0].fX) / 10; in Make2ConicalOutside() 57 SkScalar radius1 = (pts[1].fX - pts[0].fX) / 3; in Make2ConicalOutside() 58 center0.set(pts[0].fX + radius0, pts[0].fY + radius0); in Make2ConicalOutside() 59 center1.set(pts[1].fX - radius1, pts[1].fY - radius1); in Make2ConicalOutside() 67 SkScalar radius = (pts[1].fX - pts[0].fX) / 3; in Make2ConicalOutsideStrip() 68 center0.set(pts[0].fX, pts[0].fY); in Make2ConicalOutsideStrip() 69 center1.set(pts[1].fX, pts[1].fY); in Make2ConicalOutsideStrip() 77 SkScalar radius0 = (pts[1].fX - pts[0].fX) / 10; in Make2ConicalOutsideFlip() 78 SkScalar radius1 = (pts[1].fX - pts[0].fX) / 3; in Make2ConicalOutsideFlip() 79 center0.set(pts[0].fX + radius0, pts[0].fY + radius0); in Make2ConicalOutsideFlip() [all …]
|
/third_party/flutter/skia/src/core/ |
D | SkLineClipper.cpp | 33 return SkScalarAve(src[0].fX, src[1].fX); in sect_with_horizontal() 37 double X0 = src[0].fX; in sect_with_horizontal() 39 double X1 = src[1].fX; in sect_with_horizontal() 52 SkScalar dx = src[1].fX - src[0].fX; in sect_with_vertical() 58 double X0 = src[0].fX; in sect_with_vertical() 60 double X1 = src[1].fX; in sect_with_vertical() 131 if (tmp[0].fX < tmp[1].fX) { in IntersectLine() 140 if ((tmp[index1].fX <= clip.fLeft || tmp[index0].fX >= clip.fRight)) { in IntersectLine() 143 if (tmp[0].fX != tmp[1].fX || tmp[0].fX < clip.fLeft || tmp[0].fX > clip.fRight) { in IntersectLine() 148 if (tmp[index0].fX < clip.fLeft) { in IntersectLine() [all …]
|
D | SkStrokerPriv.cpp | 17 path->lineTo(stop.fX, stop.fY); in ButtCapper() 37 path->setLastPt(pivot.fX + normal.fX + parallel.fX, pivot.fY + normal.fY + parallel.fY); in SquareCapper() 38 path->lineTo(pivot.fX - normal.fX + parallel.fX, pivot.fY - normal.fY + parallel.fY); in SquareCapper() 40 path->lineTo(pivot.fX + normal.fX + parallel.fX, pivot.fY + normal.fY + parallel.fY); in SquareCapper() 41 path->lineTo(pivot.fX - normal.fX + parallel.fX, pivot.fY - normal.fY + parallel.fY); in SquareCapper() 42 path->lineTo(stop.fX, stop.fY); in SquareCapper() 49 return before.fX * after.fY > before.fY * after.fX; in is_clockwise() 78 inner->lineTo(pivot.fX, pivot.fY); in HandleInnerJoin() 81 inner->lineTo(pivot.fX - after.fX, pivot.fY - after.fY); in HandleInnerJoin() 96 outer->lineTo(pivot.fX + after.fX, pivot.fY + after.fY); in BluntJoiner() [all …]
|
D | SkRRect.cpp | 128 if (radii[i].fX <= 0 || radii[i].fY <= 0) { in clamp_to_zero() 133 radii[i].fX = 0; in clamp_to_zero() 148 if (!SkScalarsAreFinite(&radii[0].fX, 8)) { in setRectRadii() 207 scale = compute_min_scale(fRadii[0].fX, fRadii[1].fX, width, scale); in scaleRadii() 209 scale = compute_min_scale(fRadii[2].fX, fRadii[3].fX, width, scale); in scaleRadii() 212 flush_to_zero(fRadii[0].fX, fRadii[1].fX); in scaleRadii() 214 flush_to_zero(fRadii[2].fX, fRadii[3].fX); in scaleRadii() 218 SkScaleToSides::AdjustRadii(width, scale, &fRadii[0].fX, &fRadii[1].fX); in scaleRadii() 220 SkScaleToSides::AdjustRadii(width, scale, &fRadii[2].fX, &fRadii[3].fX); in scaleRadii() 246 if (x < fRect.fLeft + fRadii[kUpperLeft_Corner].fX && in checkCornerContainment() [all …]
|
/third_party/skia/src/core/ |
D | SkLineClipper.cpp | 33 return SkScalarAve(src[0].fX, src[1].fX); in sect_with_horizontal() 37 double X0 = src[0].fX; in sect_with_horizontal() 39 double X1 = src[1].fX; in sect_with_horizontal() 52 SkScalar dx = src[1].fX - src[0].fX; in sect_with_vertical() 58 double X0 = src[0].fX; in sect_with_vertical() 60 double X1 = src[1].fX; in sect_with_vertical() 131 if (tmp[0].fX < tmp[1].fX) { in IntersectLine() 140 if ((tmp[index1].fX <= clip.fLeft || tmp[index0].fX >= clip.fRight)) { in IntersectLine() 143 if (tmp[0].fX != tmp[1].fX || tmp[0].fX < clip.fLeft || tmp[0].fX > clip.fRight) { in IntersectLine() 148 if (tmp[index0].fX < clip.fLeft) { in IntersectLine() [all …]
|
D | SkRRect.cpp | 152 if (radii[i].fX <= 0 || radii[i].fY <= 0) { in clamp_to_zero() 157 radii[i].fX = 0; in clamp_to_zero() 172 if (!SkScalarsAreFinite(&radii[0].fX, 8)) { in setRectRadii() 236 scale = compute_min_scale(fRadii[0].fX, fRadii[1].fX, width, scale); in scaleRadii() 238 scale = compute_min_scale(fRadii[2].fX, fRadii[3].fX, width, scale); in scaleRadii() 241 flush_to_zero(fRadii[0].fX, fRadii[1].fX); in scaleRadii() 243 flush_to_zero(fRadii[2].fX, fRadii[3].fX); in scaleRadii() 247 SkScaleToSides::AdjustRadii(width, scale, &fRadii[0].fX, &fRadii[1].fX); in scaleRadii() 249 SkScaleToSides::AdjustRadii(width, scale, &fRadii[2].fX, &fRadii[3].fX); in scaleRadii() 275 if (x < fRect.fLeft + fRadii[kUpperLeft_Corner].fX && in checkCornerContainment() [all …]
|
D | SkStrokerPriv.cpp | 17 path->lineTo(stop.fX, stop.fY); in ButtCapper() 37 path->setLastPt(pivot.fX + normal.fX + parallel.fX, pivot.fY + normal.fY + parallel.fY); in SquareCapper() 38 path->lineTo(pivot.fX - normal.fX + parallel.fX, pivot.fY - normal.fY + parallel.fY); in SquareCapper() 40 path->lineTo(pivot.fX + normal.fX + parallel.fX, pivot.fY + normal.fY + parallel.fY); in SquareCapper() 41 path->lineTo(pivot.fX - normal.fX + parallel.fX, pivot.fY - normal.fY + parallel.fY); in SquareCapper() 42 path->lineTo(stop.fX, stop.fY); in SquareCapper() 49 return before.fX * after.fY > before.fY * after.fX; in is_clockwise() 78 inner->lineTo(pivot.fX, pivot.fY); in HandleInnerJoin() 81 inner->lineTo(pivot.fX - after.fX, pivot.fY - after.fY); in HandleInnerJoin() 96 outer->lineTo(pivot.fX + after.fX, pivot.fY + after.fY); in BluntJoiner() [all …]
|
/third_party/flutter/skia/tests/ |
D | PathOpsLineIntersectionTest.cpp | 121 double left = SkTMin(line1[0].fX, line1[1].fX); in testOne() 122 double right = SkTMax(line1[0].fX, line1[1].fX); in testOne() 124 ts.horizontal(line2, left, right, line1[0].fY, line1[0].fX != left); in testOne() 128 double left = SkTMin(line2[0].fX, line2[1].fX); in testOne() 129 double right = SkTMax(line2[0].fX, line2[1].fX); in testOne() 131 ts.horizontal(line1, left, right, line2[0].fY, line2[0].fX != left); in testOne() 134 if (line1[0].fX == line1[1].fX) { in testOne() 138 ts.vertical(line2, top, bottom, line1[0].fX, line1[0].fY != top); in testOne() 141 if (line2[0].fX == line2[1].fX) { in testOne() 145 ts.vertical(line1, top, bottom, line2[0].fX, line2[0].fY != top); in testOne() [all …]
|
/third_party/skia/tests/ |
D | PathOpsLineIntersectionTest.cpp | 121 double left = std::min(line1[0].fX, line1[1].fX); in testOne() 122 double right = std::max(line1[0].fX, line1[1].fX); in testOne() 124 ts.horizontal(line2, left, right, line1[0].fY, line1[0].fX != left); in testOne() 128 double left = std::min(line2[0].fX, line2[1].fX); in testOne() 129 double right = std::max(line2[0].fX, line2[1].fX); in testOne() 131 ts.horizontal(line1, left, right, line2[0].fY, line2[0].fX != left); in testOne() 134 if (line1[0].fX == line1[1].fX) { in testOne() 138 ts.vertical(line2, top, bottom, line1[0].fX, line1[0].fY != top); in testOne() 141 if (line2[0].fX == line2[1].fX) { in testOne() 145 ts.vertical(line1, top, bottom, line2[0].fX, line2[0].fY != top); in testOne() [all …]
|
/third_party/flutter/engine/flutter/flow/ |
D | matrix_decomposition.cc | 14 a_scale * a.fX + b_scale * b.fX, // in SkVector3Combine() 23 (a.fZ * b.fX) - (a.fX * b.fZ), // in SkVector3Cross() 24 (a.fX * b.fY) - (a.fY * b.fX) // in SkVector3Cross() 33 double mag = sqrt(v.fX * v.fX + v.fY * v.fY + v.fZ * v.fZ); in SkVector3Normalize() 35 v.fX *= scale; in SkVector3Normalize() 93 scale_.fX = row[0].length(); in MatrixDecomposition() 97 shear_.fX = row[0].dot(row[1]); in MatrixDecomposition() 98 row[1] = SkVector3Combine(row[1], 1.0, row[0], -shear_.fX); in MatrixDecomposition() 104 shear_.fX /= scale_.fY; in MatrixDecomposition() 119 scale_.fX *= -1; in MatrixDecomposition() [all …]
|