mirror of
https://github.com/FliegendeWurst/cursive.git
synced 2024-11-24 01:46:31 +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)
|
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.
|
/// Creates a new `Margins` object from the Left, Right, Top, Bottom fields.
|
||||||
pub fn lrtb(left: usize, right: usize, top: usize, bottom: usize) -> Self {
|
pub fn lrtb(left: usize, right: usize, top: usize, bottom: usize) -> Self {
|
||||||
Margins {
|
Margins {
|
||||||
|
Loading…
Reference in New Issue
Block a user