animation: Add more getters

This commit is contained in:
Ivan Molodetskikh
2025-04-17 11:00:24 +03:00
parent ba933773ab
commit 4a4c972ffb
+12 -1
View File
@@ -295,11 +295,22 @@ impl Animation {
self.to
}
#[cfg(test)]
pub fn from(&self) -> f64 {
self.from
}
pub fn start_time(&self) -> Duration {
self.start_time
}
pub fn end_time(&self) -> Duration {
self.start_time + self.duration
}
pub fn duration(&self) -> Duration {
self.duration
}
pub fn offset(&mut self, offset: f64) {
self.from += offset;
self.to += offset;