From 4a4c972ffb900951b65fb5317b62c592bbccfc44 Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Thu, 17 Apr 2025 11:00:24 +0300 Subject: animation: Add more getters --- src/animation/mod.rs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/animation/mod.rs b/src/animation/mod.rs index b6d6b552..b2f26b32 100644 --- a/src/animation/mod.rs +++ b/src/animation/mod.rs @@ -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; -- cgit