74 if ( m_data->stepCount <= 0 || points.size() <= 1 )
77 QPolygonF fittedPoints;
79 int numPoints = points.size() + ( points.size() - 1 ) * m_data->stepCount;
81 fittedPoints.resize( numPoints );
84 fittedPoints[index++] = points[0];
85 for (
int i = 1; i < points.size(); i++ )
87 const QPointF& p1 = points[i - 1];
88 const QPointF& p2 = points[i];
90 const double dx = ( p2.x() - p1.x() ) / m_data->stepCount;
91 const double dy = ( p2.y() - p1.y() ) / m_data->stepCount;
92 for (
int j = 1; j <= m_data->stepCount; j++ )
94 const double x = p1.x() + j * dx;
95 const double y = p1.y() + j * dy;
97 fittedPoints[index++] = QPointF( x, y );
100 fittedPoints.resize( index );