wip: compiles and runs (not enabled yet)

This commit is contained in:
🪞👃🪞 2025-01-04 11:19:37 +01:00
parent ac3827b8f3
commit 98d2107e4e
15 changed files with 440 additions and 357 deletions

View file

@ -14,7 +14,7 @@ macro_rules! transform_xy {
pub fn xy (item: T) -> Self { Self::XY(item) }
}
impl<E: Engine, T: Content<E>> Content<E> for $Enum<T> {
fn content (&self) -> impl Content<E> {
fn content (&self) -> impl Render<E> {
match self {
Self::X(item) => item,
Self::Y(item) => item,
@ -31,7 +31,7 @@ macro_rules! transform_xy {
transform_xy!(self: Fill |to|{
let [x0, y0, wmax, hmax] = to.xywh();
let [x, y, w, h] = Content::layout(&self.content(), to).xywh();
let [x, y, w, h] = self.content().layout(to).xywh();
match self {
X(_) => [x0, y, wmax, h],
Y(_) => [x, y0, w, hmax],