layout: Add an option to visualize parallel layout

This commit is contained in:
Patrick Walton 2015-02-20 16:46:17 -08:00
parent 172db80703
commit 40a3b41758
14 changed files with 216 additions and 88 deletions

View file

@ -766,6 +766,18 @@ impl<T> BorderRadii<T> where T: PartialEq + Zero {
}
}
impl<T> BorderRadii<T> where T: PartialEq + Zero + Clone {
/// Returns a set of border radii that all have the given value.
pub fn all_same(value: T) -> BorderRadii<T> {
BorderRadii {
top_left: value.clone(),
top_right: value.clone(),
bottom_right: value.clone(),
bottom_left: value.clone(),
}
}
}
/// Paints a line segment.
#[derive(Clone)]
pub struct LineDisplayItem {