• Home
  • Raw
  • Download

Lines Matching refs:ScalarBezCurve

53 class ScalarBezCurve {  class
58 ScalarBezCurve() : fDegree(kDegreeInvalid) {} in ScalarBezCurve() function in __anondd06c43e0111::ScalarBezCurve
61 explicit ScalarBezCurve(int degree) : fDegree(degree) { in ScalarBezCurve() function in __anondd06c43e0111::ScalarBezCurve
67 ScalarBezCurve(int degree, const std::vector<float>& weights) : ScalarBezCurve(degree) { in ScalarBezCurve() function in __anondd06c43e0111::ScalarBezCurve
90 static float Eval(const ScalarBezCurve& curve, float t) { in Eval()
92 ScalarBezCurve result = curve; in Eval()
105 void split(float t, ScalarBezCurve* left, ScalarBezCurve* right) const { in split()
110 void split(float tmin, float tmax, ScalarBezCurve* result) const { in split()
113 ScalarBezCurve ll, rl, rr; in split()
119 static void Split(const ScalarBezCurve& curve, in Split()
121 ScalarBezCurve* left, in Split()
122 ScalarBezCurve* right) { in Split()
125 ScalarBezCurve result = curve; in Split()
126 *left = ScalarBezCurve(degree); in Split()
127 *right = ScalarBezCurve(degree); in Split()
163 static ScalarBezCurve ElevateDegree(const ScalarBezCurve& curve, int newDegree) { in ElevateDegree()
170 ScalarBezCurve elevated(newDegree); in ElevateDegree()
194 static std::vector<float> ZeroSet(const ScalarBezCurve& curve) { in ZeroSet()
202 static ScalarBezCurve Mul(const ScalarBezCurve& curve, float f) { in Mul()
203 ScalarBezCurve result = curve; in Mul()
215 static ScalarBezCurve Mul(const ScalarBezCurve& a, const ScalarBezCurve& b) { in Mul()
220 ScalarBezCurve result(newDegree); in Mul()
235 static ScalarBezCurve AddSquares(const ScalarBezCurve& a, const ScalarBezCurve& b) { in AddSquares()
238 ScalarBezCurve result(newDegree); in AddSquares()
255 static ScalarBezCurve Sub(const ScalarBezCurve& a, const ScalarBezCurve& b) { in Sub()
256 ScalarBezCurve result = a; in Sub()
262 void sub(const ScalarBezCurve& other) { in sub()
287 static void ZeroSetRec(const ScalarBezCurve& curve, in ZeroSetRec()
309 ScalarBezCurve left(curve.fDegree), right(curve.fDegree); in ZeroSetRec()
392 std::unique_ptr<ScalarBezCurve> outerErr;
434 const ScalarBezCurve& varWidth,
435 const ScalarBezCurve& varWidthInner,
455 const ScalarBezCurve& varWidth,
456 const ScalarBezCurve& varWidthInner,
466 const ScalarBezCurve& distFnc) const;
496 const ScalarBezCurve& distFnc,
500 static ScalarBezCurve identityVarWidth(float strokeWidth) { in identityVarWidth()
501 return ScalarBezCurve(0, {strokeWidth / 2.0f}); in identityVarWidth()
508 ScalarBezCurve fVarWidth, fVarWidthInner;
523 const ScalarBezCurve& varWidth, in getFillPath()
524 const ScalarBezCurve& varWidthInner, in getFillPath()
567 ScalarBezCurve partVarWidth, partVarWidthInner; in getFillPath()
570 partVarWidthInner = ScalarBezCurve::Mul(partVarWidthInner, -1); in getFillPath()
628 const ScalarBezCurve& varWidth, in strokeSegment()
629 const ScalarBezCurve& varWidthInner, in strokeSegment()
639 const PathSegment& seg, const ScalarBezCurve& distFnc) const { in strokeSegment()
643 ScalarBezCurve fDistFnc, fDistFncSqd; in strokeSegment()
644 ScalarBezCurve fSegX, fSegY; in strokeSegment()
647 const ScalarBezCurve& distFnc, in strokeSegment()
648 const ScalarBezCurve& distFncSqd) in strokeSegment()
651 fSegX = ScalarBezCurve(segDegree); in strokeSegment()
652 fSegY = ScalarBezCurve(segDegree); in strokeSegment()
662 stack.push(Item(seg, distFnc, ScalarBezCurve::Mul(distFnc, distFnc))); in strokeSegment()
672 const ScalarBezCurve& distFnc = item.fDistFnc; in strokeSegment()
673 ScalarBezCurve distFncSqd = item.fDistFncSqd; in strokeSegment()
679 ScalarBezCurve quadApproxX(2), quadApproxY(2); in strokeSegment()
687 ScalarBezCurve segX = item.fSegX, segY = item.fSegY; in strokeSegment()
693 ScalarBezCurve deltaX = ScalarBezCurve::Sub(quadApproxX, segX); in strokeSegment()
694 ScalarBezCurve deltaY = ScalarBezCurve::Sub(quadApproxY, segY); in strokeSegment()
697 ScalarBezCurve E = ScalarBezCurve::AddSquares(deltaX, deltaY); in strokeSegment()
711 outerErr = std::make_unique<ScalarBezCurve>(E); in strokeSegment()
725 ScalarBezCurve distFncL, distFncR; in strokeSegment()
728 ScalarBezCurve distFncSqdL, distFncSqdR; in strokeSegment()
905 ScalarBezCurve x(degree), y(degree); in splitSegment()
911 ScalarBezCurve leftX(degree), rightX(degree), leftY(degree), rightY(degree); in splitSegment()
923 const ScalarBezCurve& distFnc, in approximateSegment()
1143 static ScalarBezCurve makeDistFnc(const std::vector<DistFncMenuItem>& fncs, float strokeWidth) { in makeDistFnc()
1147 return ScalarBezCurve::Mul(ScalarBezCurve(df.fDegree, df.fWeights), radius); in makeDistFnc()
1151 return ScalarBezCurve(0, {radius}); in makeDistFnc()
1163 ScalarBezCurve distFnc = makeDistFnc(fDistFncs, fWidth); in onDrawContent()
1164 ScalarBezCurve distFncInner = in onDrawContent()
1250 void drawErrorCurve(SkCanvas* canvas, const ScalarBezCurve& E) { in drawErrorCurve()
1262 ScalarBezCurve left(deg), right(deg); in drawErrorCurve()
1265 ScalarBezCurve rl(deg), rr(deg); in drawErrorCurve()