Paint editor background

This commit is contained in:
Antonio Scandurra 2023-11-06 15:54:09 +01:00
parent 86d1defda2
commit 769526a76a
6 changed files with 948 additions and 809 deletions

View file

@ -492,6 +492,15 @@ where
impl<T: Clone + Default + Debug + Copy> Copy for Edges<T> {}
impl<T: Clone + Default + Debug> Edges<T> {
pub fn all(value: T) -> Self {
Self {
top: value.clone(),
right: value.clone(),
bottom: value.clone(),
left: value,
}
}
pub fn map<U>(&self, f: impl Fn(&T) -> U) -> Edges<U>
where
U: Clone + Default + Debug,