! \internal Returns the pixel coordinates of the data point at \a dataIndex, using \a interface1d to access the data points. */
| 17406 | the data points. |
| 17407 | */ |
| 17408 | QPointF QCPSelectionDecoratorBracket::getPixelCoordinates(const QCPPlottableInterface1D *interface1d, int dataIndex) const |
| 17409 | { |
| 17410 | QCPAxis *keyAxis = mPlottable->keyAxis(); |
| 17411 | QCPAxis *valueAxis = mPlottable->valueAxis(); |
| 17412 | if (!keyAxis || !valueAxis) { qDebug() << Q_FUNC_INFO << "invalid key or value axis"; return {0, 0}; } |
| 17413 | |
| 17414 | if (keyAxis->orientation() == Qt::Horizontal) |
| 17415 | return {keyAxis->coordToPixel(interface1d->dataMainKey(dataIndex)), valueAxis->coordToPixel(interface1d->dataMainValue(dataIndex))}; |
| 17416 | else |
| 17417 | return {valueAxis->coordToPixel(interface1d->dataMainValue(dataIndex)), keyAxis->coordToPixel(interface1d->dataMainKey(dataIndex))}; |
| 17418 | } |
| 17419 | /* end of 'src/selectiondecorator-bracket.cpp' */ |
| 17420 | |
| 17421 |
nothing calls this directly
no test coverage detected