| 120 | } |
| 121 | |
| 122 | float ValueOfPixel(int yy, int height, bool offset, |
| 123 | bool dB, double dBRange, float zoomMin, float zoomMax) |
| 124 | { |
| 125 | wxASSERT(height > 0); |
| 126 | // Map 0 to max and height - 1 (not height) to min |
| 127 | float v = |
| 128 | height == 1 ? (zoomMin + zoomMax) / 2 : |
| 129 | zoomMax - (yy / (float)(height - 1)) * (zoomMax - zoomMin); |
| 130 | if (offset) { |
| 131 | if (v > 0.0) |
| 132 | v += .5; |
| 133 | else |
| 134 | v -= .5; |
| 135 | } |
| 136 | |
| 137 | if (dB) |
| 138 | v = FromDB(v, dBRange); |
| 139 | |
| 140 | return v; |
| 141 | } |
| 142 | |
| 143 | void TrackArt::DrawNegativeOffsetTrackArrows( |
| 144 | TrackPanelDrawingContext &context, const wxRect &rect ) |
no test coverage detected