Refactor draw command recording.

Remove distinct draw primitives and unify them into one shared form.
This commit is contained in:
meehl committed 2026-08-15 19:19:55 +02:00
1 parent a6d18a320c
commit 3fc87339ca
17 files changed
+397 -638

No files matched your search

+15 -1
View File
@@ -1,4 +1,4 @@
use crate::math::{Point, Size, Vector};
use crate::math::{Corners, Point, Rect, Size, Vector};
use bytemuck::{Pod, Zeroable};
use euclid::num::Zero;
use std::fmt;
@@ -121,3 +121,17 @@ where
Self::new(self.p0 + by, self.p1 + by, self.p2 + by, self.p3 + by)
}
}
impl<T, U> From<Rect<T, U>> for Quad<T, U>
where
T: Copy,
{
fn from(value: Rect<T, U>) -> Self {
Self::new(
value.top_left(),
value.top_right(),
value.bottom_right(),
value.bottom_left(),
)
}
}