mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-22 02:01:55 +07:00
animation: Add more getters
This commit is contained in:
+12
-1
@@ -295,11 +295,22 @@ impl Animation {
|
|||||||
self.to
|
self.to
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
|
||||||
pub fn from(&self) -> f64 {
|
pub fn from(&self) -> f64 {
|
||||||
self.from
|
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) {
|
pub fn offset(&mut self, offset: f64) {
|
||||||
self.from += offset;
|
self.from += offset;
|
||||||
self.to += offset;
|
self.to += offset;
|
||||||
|
|||||||
Reference in New Issue
Block a user