MCPcopy Create free account
hub / github.com/CieNTi/serial_port_plotter / cellToCoord

Method cellToCoord

qcustomplot/qcustomplot.cpp:25481–25487  ·  view source on GitHub ↗

! Transforms cell indices given by \a keyIndex and \a valueIndex to cell indices of this QCPColorMapData instance. The resulting coordinates are returned via the output parameters \a key and \a value. If you are only interested in a key or value coordinate, you may pass 0 as \a key or \a value. \note The QCPColorMap always displays the data at equal key/value intervals, even if t

Source from the content-addressed store, hash-verified

25479 \see coordToCell, QCPAxis::pixelToCoord
25480*/
25481void QCPColorMapData::cellToCoord(int keyIndex, int valueIndex, double *key, double *value) const
25482{
25483 if (key)
25484 *key = keyIndex/(double)(mKeySize-1)*(mKeyRange.upper-mKeyRange.lower)+mKeyRange.lower;
25485 if (value)
25486 *value = valueIndex/(double)(mValueSize-1)*(mValueRange.upper-mValueRange.lower)+mValueRange.lower;
25487}
25488
25489/*! \internal
25490

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected