#[allow(clippy::upper_case_acronyms)] #[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum BackendType {
Skia,
Parallel,
GPU,
DataShader,
}
#[derive(Clone, Debug, PartialEq, Default)]
pub enum TickDirection {
#[default]
Inside,
Outside,
InOut,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub struct TickSides {
pub top: bool,
pub bottom: bool,
pub left: bool,
pub right: bool,
}
impl TickSides {
pub const fn none() -> Self {
Self {
top: false,
bottom: false,
left: false,
right: false,
}
}
pub const fn all() -> Self {
Self {
top: true,
bottom: true,
left: true,
right: true,
}
}
pub const fn bottom_left() -> Self {
Self {
top: false,
bottom: true,
left: true,
right: false,
}
}
pub const fn with_top(mut self, enabled: bool) -> Self {
self.top = enabled;
self
}
pub const fn with_bottom(mut self, enabled: bool) -> Self {
self.bottom = enabled;
self
}
pub const fn with_left(mut self, enabled: bool) -> Self {
self.left = enabled;
self
}
pub const fn with_right(mut self, enabled: bool) -> Self {
self.right = enabled;
self
}
}
impl Default for TickSides {
fn default() -> Self {
Self::all()
}
}
#[derive(Clone, Debug, PartialEq, Default)]
pub enum GridMode {
#[default]
MajorOnly,
MinorOnly,
Both,
}