Lines Matching refs:degree
51 * A scalar (float-valued weights) Bezier curve of arbitrary degree.
57 /** Creates an empty curve with invalid degree. */
60 /** Creates a curve of the specified degree with weights initialized to 0. */
61 explicit ScalarBezCurve(int degree) : fDegree(degree) {
62 SkASSERT(degree >= 0);
63 fWeights.resize(degree + 1, {0});
66 /** Creates a curve of specified degree with the given weights. */
67 ScalarBezCurve(int degree, const std::vector<float>& weights) : ScalarBezCurve(degree) {
68 SkASSERT(degree >= 0);
69 SkASSERT(weights.size() == (size_t)degree + 1);
104 /** Splits this curve at t into two halves (of the same degree) */
118 /** Splits the curve at t into two halves (of the same degree) */
124 const int degree = curve.fDegree;
126 *left = ScalarBezCurve(degree);
127 *right = ScalarBezCurve(degree);
129 right->fWeights[degree] = curve.fWeights[degree];
131 for (int k = 1; k <= degree; k++) {
133 for (int i = degree; i >= k; i--) {
138 right->fWeights[degree - k] = result.fWeights[degree];
143 * Increases the degree of the curve to the given degree. Has no effect if the
144 * degree is already equal to the given degree.
146 * This process is always exact (NB the reverse, degree reduction, is not exact).
158 * Increases the degree of the curve to the given degree. Has no effect if the
159 * degree is already equal to the given degree.
161 * This process is always exact (NB the reverse, degree reduction, is not exact).
164 SkASSERT(newDegree >= curve.degree());
165 if (newDegree == curve.degree()) {
218 const int n = a.degree(), m = b.degree();
236 const int n = a.degree(), m = b.degree();
276 /** Returns the curve degree */
277 int degree() const { return fDegree; }
485 /** Returns the degree of a segment curve */
685 // Compute control polygon for the delta(t) curve. First must elevate to a common degree.
686 const int deltaDegree = std::max(quadApproxX.degree(), item.fSegX.degree());
699 // Promote E and d(t)^2 to a common degree.
700 const int commonDeg = std::max(distFncSqd.degree(), E.degree());
904 const int degree = segmentDegree(seg);
905 ScalarBezCurve x(degree), y(degree);
906 for (int i = 0; i <= degree; i++) {
911 ScalarBezCurve leftX(degree), rightX(degree), leftY(degree), rightY(degree);
916 for (int i = 0; i <= degree; i++) {
960 SkDebugf("Unhandled degree for segment approximation");
1066 DistFncMenuItem(const std::string& name, int degree, bool selected) {
1068 fDegree = degree;
1070 fWeights.resize(degree + 1, 1.0f);
1258 const int deg = E.degree();