mirror of
https://github.com/DanielSWolf/rhubarb-lip-sync.git
synced 2026-11-21 12:25:08 +00:00
Added time manipulation functions to TimeRange and Timeline
This commit is contained in:
@@ -32,6 +32,20 @@ void TimeRange::resize(time_type start, time_type end) {
|
||||
resize(TimeRange(start, end));
|
||||
}
|
||||
|
||||
void TimeRange::shift(time_type offset) {
|
||||
start += offset;
|
||||
end += offset;
|
||||
}
|
||||
|
||||
void TimeRange::grow(time_type value) {
|
||||
start -= value;
|
||||
end += value;
|
||||
}
|
||||
|
||||
void TimeRange::shrink(time_type value) {
|
||||
grow(-value);
|
||||
}
|
||||
|
||||
bool TimeRange::operator==(const TimeRange& rhs) const {
|
||||
return start == rhs.start && end == rhs.end;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user