use super::ViewElement;
pub mod colchar;
pub mod vec2d;
use colchar::ColChar;
use vec2d::Vec2D;
#[deprecated = "Renamed to Pixel, please use that instead"]
pub type Point = Pixel;
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct Pixel {
pub pos: Vec2D,
pub fill_char: ColChar,
}
impl Pixel {
#[must_use]
pub const fn new(pos: Vec2D, fill_char: ColChar) -> Self {
Self { pos, fill_char }
}
}
impl From<(Vec2D, ColChar)> for Pixel {
fn from(value: (Vec2D, ColChar)) -> Self {
Self {
pos: value.0,
fill_char: value.1,
}
}
}
impl ViewElement for Pixel {
fn active_pixels(&self) -> Vec<Pixel> {
vec![*self]
}
}