Lines Matching refs:cubic
91 static bool check_quadratic(const Cubic& cubic, Quadratic& reduction) { in check_quadratic() argument
92 float dx10 = cubic[1].x - cubic[0].x; in check_quadratic()
93 float dx23 = cubic[2].x - cubic[3].x; in check_quadratic()
94 float midX = cubic[0].x + dx10 * 3 / 2; in check_quadratic()
97 if (!approximately_equal(midX, (dx23 * 3 / 2) + cubic[3].x)) { in check_quadratic()
100 float dy10 = cubic[1].y - cubic[0].y; in check_quadratic()
101 float dy23 = cubic[2].y - cubic[3].y; in check_quadratic()
102 float midY = cubic[0].y + dy10 * 3 / 2; in check_quadratic()
103 if (!approximately_equal(midY, (dy23 * 3 / 2) + cubic[3].y)) { in check_quadratic()
106 reduction[0] = cubic[0]; in check_quadratic()
109 reduction[2] = cubic[3]; in check_quadratic()
119 Cubic cubic = { { prevPt.x, prevPt.y }, in AddBeziers() local
124 if (check_quadratic(cubic, quadratic)) { in AddBeziers()