1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-02-21 21:51:58 +01:00

More const qualifications, and mutables, for functions that draw tracks...

... The display related  members that had to become mutable are probably
ones that don't belong in the track classes, ultimately.
This commit is contained in:
Paul Licameli
2016-02-27 12:12:40 -05:00
parent 05f5375e4a
commit 70c1d57591
15 changed files with 98 additions and 93 deletions

View File

@@ -124,17 +124,17 @@ void TimeTrack::SetInterpolateLog(bool interpolateLog) {
}
//Compute the (average) warp factor between two non-warped time points
double TimeTrack::ComputeWarpFactor(double t0, double t1)
double TimeTrack::ComputeWarpFactor(double t0, double t1) const
{
return GetEnvelope()->AverageOfInverse(t0, t1);
}
double TimeTrack::ComputeWarpedLength(double t0, double t1)
double TimeTrack::ComputeWarpedLength(double t0, double t1) const
{
return GetEnvelope()->IntegralOfInverse(t0, t1);
}
double TimeTrack::SolveWarpedLength(double t0, double length)
double TimeTrack::SolveWarpedLength(double t0, double length) const
{
return GetEnvelope()->SolveIntegralOfInverse(t0, length);
}
@@ -229,7 +229,7 @@ void TimeTrack::WriteXML(XMLWriter &xmlFile)
xmlFile.EndTag(wxT("timetrack"));
}
void TimeTrack::Draw(wxDC & dc, const wxRect & r, const ZoomInfo &zoomInfo)
void TimeTrack::Draw(wxDC & dc, const wxRect & r, const ZoomInfo &zoomInfo) const
{
double min = zoomInfo.PositionToTime(0);
double max = zoomInfo.PositionToTime(r.width);