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

Method drawStatisticalBox

3rdparty/qcustomplot/qcustomplot.cpp:25691–25714  ·  view source on GitHub ↗

! Draws the graphical representation of a single statistical box with the data given by the iterator \a it with the provided \a painter. If the statistical box has a set of outlier data points, they are drawn with \a outlierStyle. \see getQuartileBox, getWhiskerBackboneLines, getWhiskerBarLines */

Source from the content-addressed store, hash-verified

25689 \see getQuartileBox, getWhiskerBackboneLines, getWhiskerBarLines
25690*/
25691void QCPStatisticalBox::drawStatisticalBox(QCPPainter *painter, QCPStatisticalBoxDataContainer::const_iterator it, const QCPScatterStyle &outlierStyle) const
25692{
25693 // draw quartile box:
25694 applyDefaultAntialiasingHint(painter);
25695 const QRectF quartileBox = getQuartileBox(it);
25696 painter->drawRect(quartileBox);
25697 // draw median line with cliprect set to quartile box:
25698 painter->save();
25699 painter->setClipRect(quartileBox, Qt::IntersectClip);
25700 painter->setPen(mMedianPen);
25701 painter->drawLine(QLineF(coordsToPixels(it->key-mWidth*0.5, it->median), coordsToPixels(it->key+mWidth*0.5, it->median)));
25702 painter->restore();
25703 // draw whisker lines:
25704 applyAntialiasingHint(painter, mWhiskerAntialiased, QCP::aePlottables);
25705 painter->setPen(mWhiskerPen);
25706 painter->drawLines(getWhiskerBackboneLines(it));
25707 painter->setPen(mWhiskerBarPen);
25708 painter->drawLines(getWhiskerBarLines(it));
25709 // draw outliers:
25710 applyScattersAntialiasingHint(painter);
25711 outlierStyle.applyTo(painter, mPen);
25712 for (int i=0; i<it->outliers.size(); ++i)
25713 outlierStyle.drawShape(painter, coordsToPixels(it->key, it->outliers.at(i)));
25714}
25715
25716/*! \internal
25717

Callers

nothing calls this directly

Calls 8

setPenMethod · 0.80
drawLineMethod · 0.80
restoreMethod · 0.80
applyToMethod · 0.80
drawShapeMethod · 0.80
saveMethod · 0.45
sizeMethod · 0.45
atMethod · 0.45

Tested by

no test coverage detected