MCPcopy Index your code
hub / github.com/Audio4Linux/JDSP4Linux / getLines

Method getLines

3rdparty/qcustomplot/qcustomplot.cpp:21248–21275  ·  view source on GitHub ↗

! \internal This method retrieves an optimized set of data points via \ref getOptimizedLineData, and branches out to the line style specific functions such as \ref dataToLines, \ref dataToStepLeftLines, etc. according to the line style of the graph. \a lines will be filled with points in pixel coordinates, that can be drawn with the according draw functions like \ref drawLinePlot and \

Source from the content-addressed store, hash-verified

21246 \see getScatters
21247*/
21248void QCPGraph::getLines(QVector<QPointF> *lines, const QCPDataRange &dataRange) const
21249{
21250 if (!lines) return;
21251 QCPGraphDataContainer::const_iterator begin, end;
21252 getVisibleDataBounds(begin, end, dataRange);
21253 if (begin == end)
21254 {
21255 lines->clear();
21256 return;
21257 }
21258
21259 QVector<QCPGraphData> lineData;
21260 if (mLineStyle != lsNone)
21261 getOptimizedLineData(&lineData, begin, end);
21262
21263 if (mKeyAxis->rangeReversed() != (mKeyAxis->orientation() == Qt::Vertical)) // make sure key pixels are sorted ascending in lineData (significantly simplifies following processing)
21264 std::reverse(lineData.begin(), lineData.end());
21265
21266 switch (mLineStyle)
21267 {
21268 case lsNone: lines->clear(); break;
21269 case lsLine: *lines = dataToLines(lineData); break;
21270 case lsStepLeft: *lines = dataToStepLeftLines(lineData); break;
21271 case lsStepRight: *lines = dataToStepRightLines(lineData); break;
21272 case lsStepCenter: *lines = dataToStepCenterLines(lineData); break;
21273 case lsImpulse: *lines = dataToImpulseLines(lineData); break;
21274 }
21275}
21276
21277/*! \internal
21278

Callers 1

drawFillMethod · 0.80

Calls 4

reverseFunction · 0.50
clearMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected