! \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 */
| 21668 | \see drawLinePlot, drawScatterPlot |
| 21669 | */ |
| 21670 | void 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 |