use crate::Pixel;
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub struct LineStyle {
pub color: Pixel,
pub width: usize,
}
impl LineStyle {
pub const fn new() -> Self {
Self {
color: Pixel::rgb(0, 0, 255),
width: 1,
}
}
pub const fn color(mut self, color: Pixel) -> Self {
self.color = color;
self
}
pub const fn width(mut self, width: usize) -> Self {
self.width = width;
self
}
}
impl Default for LineStyle {
fn default() -> Self {
Self::new()
}
}
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub struct MarkerStyle {
pub color: Pixel,
pub size: usize,
}
impl MarkerStyle {
pub const fn new() -> Self {
Self {
color: Pixel::rgb(255, 0, 0),
size: 1,
}
}
pub const fn color(mut self, color: Pixel) -> Self {
self.color = color;
self
}
pub const fn size(mut self, size: usize) -> Self {
self.size = size;
self
}
}
impl Default for MarkerStyle {
fn default() -> Self {
Self::new()
}
}