wip: big flat pt.12, down to 1 error

This commit is contained in:
🪞👃🪞 2024-12-30 21:38:41 +01:00
parent b718e54d33
commit e21ef1af94
9 changed files with 53 additions and 30 deletions

View file

@ -1,5 +1,5 @@
use crate::*;
use std::sync::{Arc, atomic::AtomicUsize};
use std::sync::{Arc, atomic::{AtomicUsize, Ordering::Relaxed}};
impl Direction {
pub fn is_north (&self) -> bool { matches!(self, Self::North) }
@ -46,6 +46,14 @@ pub struct Measure<E: Engine> {
pub y: Arc<AtomicUsize>,
}
render!(Measure<E>
|self, layout|Ok(Some(layout)),
|self, render|{
self.x.store(render.area().w().into(), Relaxed);
self.y.store(render.area().h().into(), Relaxed);
Ok(())
});
impl<E: Engine> Clone for Measure<E> {
fn clone (&self) -> Self {
Self {