MCPcopy Create free account
hub / github.com/CieNTi/serial_port_plotter / getFillPolygon

Method getFillPolygon

qcustomplot/qcustomplot.cpp:21422–21433  ·  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

21420 \see drawFill, getNonNanSegments
21421*/
21422const QPolygonF QCPGraph::getFillPolygon(const QVector<QPointF> *lineData, QCPDataRange segment) const
21423{
21424 if (segment.size() < 2)
21425 return QPolygonF();
21426 QPolygonF result(segment.size()+2);
21427
21428 result[0] = getFillBasePoint(lineData->at(segment.begin()));
21429 std::copy(lineData->constBegin()+segment.begin(), lineData->constBegin()+segment.end(), result.begin()+1);
21430 result[result.size()-1] = getFillBasePoint(lineData->at(segment.end()-1));
21431
21432 return result;
21433}
21434
21435/*! \internal
21436

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected