mirror of
https://github.com/FliegendeWurst/cursive.git
synced 2024-11-27 11:16:03 +00:00
Add Margins::zeroes
This commit is contained in:
parent
418fda99ba
commit
d464dc8ce0
@ -23,6 +23,11 @@ impl Margins {
|
||||
Self::lrtb(left, right, top, bottom)
|
||||
}
|
||||
|
||||
/// Creates a new `Margins` object with zero margins.
|
||||
pub fn zeroes() -> Self {
|
||||
Self::lrtb(0, 0, 0, 0)
|
||||
}
|
||||
|
||||
/// Creates a new `Margins` object from the Left, Right, Top, Bottom fields.
|
||||
pub fn lrtb(left: usize, right: usize, top: usize, bottom: usize) -> Self {
|
||||
Margins {
|
||||
|
Loading…
Reference in New Issue
Block a user