1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#[derive(Copy, Clone)]
pub enum FormatAlignType {
    Top,
    Center,
    Bottom,
    Left,
    VerticalCenter,
    Right,
}

impl FormatAlignType {
    pub(crate) fn to_str(&self) -> &str {
        match self {
            FormatAlignType::Top => "top",
            FormatAlignType::Center => "center",
            FormatAlignType::Bottom => "bottom",
            FormatAlignType::Left => "left",
            FormatAlignType::VerticalCenter => "center",
            FormatAlignType::Right => "right",
        }
    }
}

pub struct FormatAlign {
    pub(crate) horizontal: Option<FormatAlignType>,
    pub(crate) vertical: Option<FormatAlignType>,
    pub(crate) reading_order: Option<u8>,
    pub(crate) indent: Option<u8>,
}

impl Default for FormatAlign {
    fn default() -> Self {
        Self {
            horizontal: None,// FormatAlignType::Right,
            vertical: None,// FormatAlignType::Bottom,
            reading_order: None,
            indent: None,
        }
    }
}