API ReferenceLayout Values
Size
Finite non-negative 2D extent with constructors.
use incular::prelude::*;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let box_size = Size::new(160.0, 96.0);
let app = Application::new(move |_cx| {
Container::builder()
.padding(EdgeInsets::all(24.0))
.alignment(Alignment::CENTER)
.child(SizedBox::from_size(box_size))
.build()
.into()
})?;
incular::run(app)?;
Ok(())
}| Member | Kind | Notes |
|---|---|---|
ZERO | Constant | 0.0 × 0.0 |
new(w, h) | Constructor | Panics if non-finite or negative |
width / height | Fields | Public f32 |
Component-wise Lerp floored at 0. Used by Constraints,
SizedBox, and
CustomPaint.