! \internal Returns the polygon needed for drawing normal fills between this graph and the key axis. Pass the graph's data points (in pixel coordinates) as \a lineData, and specify the \a segment which shall be used for the fill. The collection of \a lineData points described by \a segment must not contain NaN data points (see \ref getNonNanSegments). The returned fill polygon w
| 22210 | \see drawFill, getNonNanSegments |
| 22211 | */ |
| 22212 | const QPolygonF QCPGraph::getFillPolygon(const QVector<QPointF> *lineData, QCPDataRange segment) const |
| 22213 | { |
| 22214 | if (segment.size() < 2) |
| 22215 | return QPolygonF(); |
| 22216 | QPolygonF result(segment.size()+2); |
| 22217 | |
| 22218 | result[0] = getFillBasePoint(lineData->at(segment.begin())); |
| 22219 | std::copy(lineData->constBegin()+segment.begin(), lineData->constBegin()+segment.end(), result.begin()+1); |
| 22220 | result[result.size()-1] = getFillBasePoint(lineData->at(segment.end()-1)); |
| 22221 | |
| 22222 | return result; |
| 22223 | } |
| 22224 | |
| 22225 | /*! \internal |
| 22226 |
nothing calls this directly
no test coverage detected