alchemy_styles/stretch/
result.rs

1//! This module is included while awaiting an upstream merge in stretch proper.
2//! You should not rely on it, and consider it an implementation detail.
3
4use crate::stretch::algo::ComputeResult;
5use crate::stretch::geometry::{Point, Size};
6use crate::stretch::number::Number;
7
8#[derive(Copy, Debug, Clone)]
9pub struct Layout {
10    pub(crate) order: u32,
11    pub size: Size<f32>,
12    pub location: Point<f32>,
13}
14
15impl Layout {
16    pub(crate) fn new() -> Self {
17        Layout { order: 0, size: Size { width: 0.0, height: 0.0 }, location: Point { x: 0.0, y: 0.0 } }
18    }
19}
20
21#[derive(Debug, Clone)]
22pub(crate) struct Cache {
23    pub(crate) node_size: Size<Number>,
24    pub(crate) parent_size: Size<Number>,
25    pub(crate) perform_layout: bool,
26
27    pub(crate) result: ComputeResult,
28}