29 if (_ControlPolygon.size() != 4) {
34 vector<Vec2d>::const_iterator p0, p1, p2, p3;
35 p0 = _ControlPolygon.begin();
44 x[0] = -p0->x() + 3 * p1->x() - 3 * p2->x() + p3->x();
45 x[1] = 3 * p0->x() - 6 * p1->x() + 3 * p2->x();
46 x[2] = -3 * p0->x() + 3 * p1->x();
49 y[0] = -p0->y() + 3 * p1->y() - 3 * p2->y() + p3->y();
50 y[1] = 3 * p0->y() - 6 * p1->y() + 3 * p2->y();
51 y[2] = -3 * p0->y() + 3 * p1->y();
55 float increment = 1.0 /
float(nvertices);
57 for (
int i = 0; i <= nvertices; ++i) {
58 _Vertices.emplace_back((x[3] + t * (x[2] + t * (x[1] + t * x[0]))),
59 (y[3] + t * (y[2] + t * (y[1] + t * y[0]))));