Skip to main content

Crate motif

Crate motif 

Source

Modules§

context
DrawContext provides a painter’s stack for building scenes.
geometry
Core geometry primitives for motif.
renderer
Renderer trait for backend abstraction.
scene
Scene holds primitives for rendering.

Structs§

Corners
Corner values for border radii.
DebugRenderer
Debug renderer that counts primitives without GPU.
DevicePixels
Device pixels - physical pixel coordinate space.
DrawContext
Painter’s stack for hierarchical drawing.
Edges
Edge values for padding, margin, border widths. Follows CSS order: top, right, bottom, left.
LogicalPixels
Logical pixels - DPI-independent coordinate space.
Quad
A filled/stroked rectangle with optional rounded corners.
ScaleFactor
Scale factor for converting between logical and device pixels.
Scene
Holds all primitives for a frame, ready for rendering.

Enums§

Axis
Axis in 2D space.

Traits§

Renderer
Backend-agnostic renderer.
Unit
The name of a coordinate space.

Type Aliases§

DevicePoint
DeviceRect
DeviceSize
Hsla
Linear HSL with an alpha component. See the Hsla implementation in Alpha.
LinSrgba
Linear sRGB with an alpha component.
Point
Rect
Size
Srgba
Non-linear sRGB with an alpha component.
Vector