MCPcopy Create free account
hub / github.com/LUX-Core/lux / drawSubGridLines

Method drawSubGridLines

src/qt/qcustomplot.cpp:7340–7362  ·  view source on GitHub ↗

! \internal Draws the sub grid lines with the specified painter. This is a helper function called by \ref draw. */

Source from the content-addressed store, hash-verified

7338 This is a helper function called by \ref draw.
7339*/
7340void QCPGrid::drawSubGridLines(QCPPainter *painter) const
7341{
7342 if (!mParentAxis) { qDebug() << Q_FUNC_INFO << "invalid parent axis"; return; }
7343
7344 applyAntialiasingHint(painter, mAntialiasedSubGrid, QCP::aeSubGrid);
7345 double t; // helper variable, result of coordinate-to-pixel transforms
7346 painter->setPen(mSubGridPen);
7347 if (mParentAxis->orientation() == Qt::Horizontal)
7348 {
7349 for (int i=0; i<mParentAxis->mSubTickVector.size(); ++i)
7350 {
7351 t = mParentAxis->coordToPixel(mParentAxis->mSubTickVector.at(i)); // x
7352 painter->drawLine(QLineF(t, mParentAxis->mAxisRect->bottom(), t, mParentAxis->mAxisRect->top()));
7353 }
7354 } else
7355 {
7356 for (int i=0; i<mParentAxis->mSubTickVector.size(); ++i)
7357 {
7358 t = mParentAxis->coordToPixel(mParentAxis->mSubTickVector.at(i)); // y
7359 painter->drawLine(QLineF(mParentAxis->mAxisRect->left(), t, mParentAxis->mAxisRect->right(), t));
7360 }
7361 }
7362}
7363
7364
7365////////////////////////////////////////////////////////////////////////////////////////////////////

Callers

nothing calls this directly

Calls 5

setPenMethod · 0.80
coordToPixelMethod · 0.80
drawLineMethod · 0.80
sizeMethod · 0.45
atMethod · 0.45

Tested by

no test coverage detected