MCPcopy Create free account
hub / github.com/audacity/audacity / DrawTimeTrack

Function DrawTimeTrack

src/tracks/timetrack/ui/TimeTrackView.cpp:133–154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131}
132
133void 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
157void TimeTrackView::Draw(

Callers 1

DrawMethod · 0.85

Calls 5

DrawHorzRulerAndCurveFunction · 0.85
GetFunction · 0.85
maxFunction · 0.85
GetRangeLowerMethod · 0.45
GetRangeUpperMethod · 0.45

Tested by

no test coverage detected