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

Method drawImpulsePlot

3rdparty/qcustomplot/qcustomplot.cpp:21670–21682  ·  view source on GitHub ↗

! \internal Draws impulses from the provided data, i.e. it connects all line pairs in \a lines, given in pixel coordinates. The \a lines necessary for impulses are generated by \ref dataToImpulseLines from the regular graph data points. \see drawLinePlot, drawScatterPlot */

Source from the content-addressed store, hash-verified

21668 \see drawLinePlot, drawScatterPlot
21669*/
21670void QCPGraph::drawImpulsePlot(QCPPainter *painter, const QVector<QPointF> &lines) const
21671{
21672 if (painter->pen().style() != Qt::NoPen && painter->pen().color().alpha() != 0)
21673 {
21674 applyDefaultAntialiasingHint(painter);
21675 QPen oldPen = painter->pen();
21676 QPen newPen = painter->pen();
21677 newPen.setCapStyle(Qt::FlatCap); // so impulse line doesn't reach beyond zero-line
21678 painter->setPen(newPen);
21679 painter->drawLines(lines);
21680 painter->setPen(oldPen);
21681 }
21682}
21683
21684/*! \internal
21685

Callers

nothing calls this directly

Calls 3

alphaMethod · 0.80
setPenMethod · 0.80
colorMethod · 0.45

Tested by

no test coverage detected