mappings: rewrite pixel maps to use the stronger geometry primitives and coordinate space APIs

This commit is contained in:
2024-11-24 19:09:20 +01:00
parent e8f6a90d0f
commit 54e7506865
2 changed files with 133 additions and 109 deletions

View File

@ -95,10 +95,6 @@ impl<T: CoordLimits<Data = T>, S: CoordinateSpace> Coordinates<T, S> {
pub struct Virtual {}
impl CoordinateSpace for Virtual {}
#[derive(PartialEq, Debug, Copy, Clone)]
pub struct Physical {}
impl CoordinateSpace for Physical {}
#[derive(PartialEq, Debug, Copy, Clone)]
pub struct Coord8<S: CoordinateSpace> {
x: u8,
@ -107,7 +103,6 @@ pub struct Coord8<S: CoordinateSpace> {
}
pub type VirtualCoordinates = Coordinates<u8, Virtual>;
pub type PhysicalCoordinates = Coordinates<usize, Physical>;
#[derive(PartialEq, Eq, Copy, Clone, Debug, PartialOrd)]
pub struct Rectangle<CoordData: CoordLimits<Data = CoordData>, Space: CoordinateSpace> {