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

Method getPixelCoordinates

src/qt/qcustomplot.cpp:16633–16643  ·  view source on GitHub ↗

! \internal Returns the pixel coordinates of the data point at \a dataIndex, using \a interface1d to access the data points. */

Source from the content-addressed store, hash-verified

16631 the data points.
16632*/
16633QPointF QCPSelectionDecoratorBracket::getPixelCoordinates(const QCPPlottableInterface1D *interface1d, int dataIndex) const
16634{
16635 QCPAxis *keyAxis = mPlottable->keyAxis();
16636 QCPAxis *valueAxis = mPlottable->valueAxis();
16637 if (!keyAxis || !valueAxis) { qDebug() << Q_FUNC_INFO << "invalid key or value axis"; return QPointF(0, 0); }
16638
16639 if (keyAxis->orientation() == Qt::Horizontal)
16640 return QPointF(keyAxis->coordToPixel(interface1d->dataMainKey(dataIndex)), valueAxis->coordToPixel(interface1d->dataMainValue(dataIndex)));
16641 else
16642 return QPointF(valueAxis->coordToPixel(interface1d->dataMainValue(dataIndex)), keyAxis->coordToPixel(interface1d->dataMainKey(dataIndex)));
16643}
16644/* end of 'src/selectiondecorator-bracket.cpp' */
16645
16646

Callers

nothing calls this directly

Calls 3

coordToPixelMethod · 0.80
dataMainKeyMethod · 0.45
dataMainValueMethod · 0.45

Tested by

no test coverage detected