MCPcopy Create free account
hub / github.com/Audio4Linux/JDSP4Linux / getFillPolygon

Method getFillPolygon

3rdparty/qcustomplot/qcustomplot.cpp:22212–22223  ·  view source on GitHub ↗

! \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

Source from the content-addressed store, hash-verified

22210 \see drawFill, getNonNanSegments
22211*/
22212const 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

Callers

nothing calls this directly

Calls 5

constBeginMethod · 0.80
sizeMethod · 0.45
atMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected