! \internal Returns the pixel coordinates of the data point at \a dataIndex, using \a interface1d to access the data points. */
| 16631 | the data points. |
| 16632 | */ |
| 16633 | QPointF 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 |
nothing calls this directly
no test coverage detected