! Transforms plot coordinates given by \a key and \a value to cell indices of this QCPColorMapData instance. The resulting cell indices are returned via the output parameters \a keyIndex and \a valueIndex. The retrieved key/value cell indices can then be used for example with \ref setCell. If you are only interested in a key or value index, you may pass 0 as \a valueIndex or \a k
| 25456 | \see cellToCoord, QCPAxis::coordToPixel |
| 25457 | */ |
| 25458 | void QCPColorMapData::coordToCell(double key, double value, int *keyIndex, int *valueIndex) const |
| 25459 | { |
| 25460 | if (keyIndex) |
| 25461 | *keyIndex = (key-mKeyRange.lower)/(mKeyRange.upper-mKeyRange.lower)*(mKeySize-1)+0.5; |
| 25462 | if (valueIndex) |
| 25463 | *valueIndex = (value-mValueRange.lower)/(mValueRange.upper-mValueRange.lower)*(mValueSize-1)+0.5; |
| 25464 | } |
| 25465 | |
| 25466 | /*! |
| 25467 | Transforms cell indices given by \a keyIndex and \a valueIndex to cell indices of this QCPColorMapData |
nothing calls this directly
no outgoing calls
no test coverage detected