mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-21 02:01:55 +07:00
animation: Add more getters
This commit is contained in:
+12
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user