Skip to main content

Crate xgpui_canvas

Crate xgpui_canvas 

Source
Expand description

BETA spatial viewport: f64 camera, retained scene culling, snapping and procedural grids. Expect significant API changes.

Screen coordinates are viewport-local logical pixels. World coordinates stay in f64; convert to f32 only after projection.

Structs§

AlignmentGuide
World-space guide: constant coordinate on axis, start/end on the other axis.
Camera2D
Translation and uniform scale; rotation is intentionally deferred.
Overview
Cached center-density overview, bounded to 32×32 cells, independent of GPUI. Build once and refresh after edits; projection and painting need no scene scan.
OverviewCell
PanGesture
Pointer pan state in viewport-local logical pixels. The caller owns button, modifier and focus policy. Call end on release, cancellation or focus loss.
Point
Scene
Retained scene with BVH queries. Order is back-to-front.
SceneItem
World bounds and caller-owned data, retained independently of GPUI elements.
SnapResult
VisibleItem
WorldBounds

Enums§

Axis
LevelOfDetail
Suggested presentation based on the longest projected side, in logical pixels.