use iced_native::Color;
use crate::core::Offset;
use crate::style::default_colors;
#[derive(Debug, Copy, Clone, PartialEq)]
pub enum Placement {
BothSides {
offset: Offset,
inside: bool,
},
LeftOrTop {
offset: Offset,
inside: bool,
},
RightOrBottom {
offset: Offset,
inside: bool,
},
Center {
offset: Offset,
fill_length: bool,
},
CenterSplit {
offset: Offset,
fill_length: bool,
gap: f32,
},
}
impl std::default::Default for Placement {
fn default() -> Self {
Placement::BothSides {
offset: Default::default(),
inside: false,
}
}
}
#[derive(Debug, Copy, Clone, PartialEq)]
pub struct Appearance {
pub tier_1: Shape,
pub tier_2: Shape,
pub tier_3: Shape,
}
#[derive(Debug, Copy, Clone, PartialEq)]
pub enum Shape {
None,
Line {
length: f32,
width: f32,
color: Color,
},
Circle {
diameter: f32,
color: Color,
},
}
impl Default for Appearance {
fn default() -> Self {
Self {
tier_1: Shape::Line {
length: 4.0,
width: 2.0,
color: default_colors::TICK_TIER_1,
},
tier_2: Shape::Line {
length: 3.0,
width: 2.0,
color: default_colors::TICK_TIER_2,
},
tier_3: Shape::Line {
length: 2.0,
width: 1.0,
color: default_colors::TICK_TIER_3,
},
}
}
}