| 131 | } |
| 132 | |
| 133 | void DrawTimeTrack(TrackPanelDrawingContext &context, |
| 134 | const TimeTrack &track, Ruler &ruler, |
| 135 | const wxRect & rect) |
| 136 | { |
| 137 | // Ruler and curve... |
| 138 | DrawHorzRulerAndCurve( context, rect, track, ruler ); |
| 139 | |
| 140 | // ... then the control points |
| 141 | wxRect envRect = rect; |
| 142 | envRect.height -= 2; |
| 143 | double lower = track.GetRangeLower(), upper = track.GetRangeUpper(); |
| 144 | const auto artist = TrackArtist::Get( context ); |
| 145 | const auto dbRange = artist->mdBrange; |
| 146 | if(track.GetDisplayLog()) { |
| 147 | // MB: silly way to undo the work of GetWaveYPos while still getting a logarithmic scale |
| 148 | lower = LINEAR_TO_DB(std::max(1.0e-7, lower)) / dbRange + 1.0; |
| 149 | upper = LINEAR_TO_DB(std::max(1.0e-7, upper)) / dbRange + 1.0; |
| 150 | } |
| 151 | EnvelopeEditor::DrawPoints( *track.GetEnvelope(), |
| 152 | context, envRect, |
| 153 | track.GetDisplayLog(), dbRange, lower, upper, false ); |
| 154 | } |
| 155 | } |
| 156 | |
| 157 | void TimeTrackView::Draw( |
no test coverage detected