MCPcopy Create free account
hub / github.com/collin80/SavvyCAN / drawImpulsePlot

Method drawImpulsePlot

qcustomplot.cpp:20880–20892  ·  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

20878 \see drawLinePlot, drawScatterPlot
20879*/
20880void QCPGraph::drawImpulsePlot(QCPPainter *painter, const QVector<QPointF> &lines) const
20881{
20882 if (painter->pen().style() != Qt::NoPen && painter->pen().color().alpha() != 0)
20883 {
20884 applyDefaultAntialiasingHint(painter);
20885 QPen oldPen = painter->pen();
20886 QPen newPen = painter->pen();
20887 newPen.setCapStyle(Qt::FlatCap); // so impulse line doesn't reach beyond zero-line
20888 painter->setPen(newPen);
20889 painter->drawLines(lines);
20890 painter->setPen(oldPen);
20891 }
20892}
20893
20894/*! \internal
20895

Callers

nothing calls this directly

Calls 3

alphaMethod · 0.80
colorMethod · 0.80
setPenMethod · 0.80

Tested by

no test coverage detected