carbide_core 0.70.1

An easy-to-use, 100% Rust, extensible 2D GUI library.
Documentation
use crate::Scalar;

#[derive(Debug, Copy, Clone)]
pub struct EdgeInsets {
    pub top: Scalar,
    pub bottom: Scalar,
    pub left: Scalar,
    pub right: Scalar,
}

impl EdgeInsets {
    pub fn all(amount: Scalar) -> Self {
        EdgeInsets {
            top: amount,
            bottom: amount,
            left: amount,
            right: amount
        }
    }
}