API ReferenceLayout Values
Offset
2D point and vector in logical pixels.
use incular::prelude::*;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let app = Application::new(|_cx| {
Container::builder()
.padding(EdgeInsets::all(24.0))
.alignment(Alignment::CENTER)
.child(
Transform::translation(
Offset::new(16.0, 8.0),
Text::new("Shifted"),
),
)
.build()
.into()
})?;
incular::run(app)?;
Ok(())
}| Member | Kind | Notes |
|---|---|---|
ZERO | Constant | (0.0, 0.0) |
new(x, y) | Constructor | const fn, any finite values |
x / y | Fields | Public f32 |
Supports Lerp. Used for positions, drag deltas
(GestureDetector), and
Transform pivots.