Core types and traits for Presentar UI framework.
This crate provides foundational types used throughout Presentar:
- Geometric primitives: [
Point], [Size], [Rect] - Color representation: [
Color] with WCAG contrast calculations - Layout constraints: [
Constraints] - Events and messages: [
Event], [Message] - Draw commands: [
DrawCommand] for GPU rendering
Quick Start
use ;
// Create a size
let size = new;
// Create constraints
let constraints = new;
let bounded = constraints.constrain;
// Create a color
let red = RED;
assert_eq!;
Widget Trait
The core [Widget] trait defines the measure-layout-paint cycle:
use ;
;