Skip to main content

Crate stipple_geometry

Crate stipple_geometry 

Source
Expand description

2D geometry primitives for the Stipple UI toolkit.

Stipple works in logical pixels (f64): device-independent units that the platform layer converts to physical device pixels using a ScaleFactor. All layout, hit-testing, and the public widget API speak logical pixels; physical pixels appear only at the stipple-platform / stipple-render boundary (see PhysicalSize).

This crate is a dependency-free leaf. Interop with oxideav-core’s Transform2D lives in stipple-render, at the render boundary, to keep the geometry types free of any rendering dependency.

Structs§

Affine
A 2D affine transform stored as six coefficients [a, b, c, d, e, f], row-major, mapping a point (x, y) to:
Insets
Edge insets (padding/margin) in logical pixels.
PhysicalSize
An integer pixel extent in physical device pixels. This is the unit the platform layer and the render surface allocate buffers in.
Point
A position in logical-pixel space.
Rect
An axis-aligned rectangle in logical-pixel space, defined by its top-left origin and its size.
ScaleFactor
The ratio of physical device pixels to logical pixels for a surface (e.g. 2.0 on a typical HiDPI “retina” display, 1.0 on a standard display). Always strictly positive.
Size
A 2D extent (width × height) in logical pixels.
Vec2
A 2D vector (displacement) in logical pixels.