Skip to main content

Crate waterui_shape

Crate waterui_shape 

Source
Expand description

Shape system for WaterUI with HDR support.

This module provides a trait-based system for defining shapes that can be used for clipping views and as filled views.

Filled shapes are emitted as native ResolvedShape raw views so each backend renders paths with its own 2D engine. Morphing shapes stay GPU-backed.

§Example

use waterui::prelude::*;
use waterui::shape::*;

// Clip to a circle
image("avatar.jpg").clip(Circle);

// Fill a shape with HDR color
Circle.fill(Color::red().with_headroom(0.5))

Structs§

Capsule
A capsule (pill) shape.
Circle
A circle inscribed in the view bounds.
ClipShape
Metadata for clipping a view to a shape.
Ellipse
An ellipse that fills the view bounds.
FilledShape
A shape filled with a color, resolved to ResolvedShape.
FixedRoundedRectangle
A rectangle with a uniform corner radius in logical points.
FixedUnevenRoundedRectangle
A rectangle with independent corner radii in logical points.
MorphAnimation
Configuration for shape morph animations.
MorphShape
A morphing filled shape view.
Path
A custom path defined by explicit commands.
Rectangle
A simple rectangle with sharp corners.
ResolvedMorphShape
Resolved morphing shape payload rendered directly by capable backends.
ResolvedShape
Resolved shape payload rendered directly by native backends.
RoundedRectangle
A rectangle with uniform corner radius.
UnevenRoundedRectangle
A rectangle with independent corner radii.

Enums§

PathCommand
A single path command for drawing shapes.
ShapeKind
The kind of shape for backend rendering optimization.

Traits§

Shape
A trait for types that can produce path commands for clipping.
ShapeExt
Extension trait for filling shapes with color.