API reference

aster_ui::transform

Pre-1.0: signatures are not frozen. Generated from rustdoc JSON of the compiled crate; rustdoc JSON format version 60. Only public items are listed.

Owned facade maps backed by the shared rendering/input math kernel.

Structs

structaster_ui::transform::Affine2D

pub struct Affine2D(..)

Maps (x,y) to (ax+cy+tx, bx+dy+ty). No backend type leaks.

Methods

  • const IDENTITY: Self
  • fn new(values: [f64; 6]) -> Result<Self, TransformError>
  • fn values(self) -> [f64; 6]
  • fn translation(offset: [f64; 2]) -> Result<Self, TransformError>
  • fn compose(self, local: Self) -> Result<Self, TransformError> — Returns self(local(point)): the argument executes first.
  • fn point(self, point: [f64; 2]) -> Result<[f64; 2], TransformError>
  • fn vector(self, delta: [f64; 2]) -> Result<[f64; 2], TransformError>
  • fn rect_bounds(self, rect: LogicalRect) -> Result<LogicalRect, TransformError> — Conservative axis-aligned enclosure, not a geometric clip or hit test.
  • fn inverse(self) -> Result<InverseAffine2D, TransformError> — Uses exactly the shared compositor inverse; translation is subtracted before linear mapping. Singularity and numerical range are distinct.

Trait implementations: Clone, Copy, Debug, PartialEq, StructuralPartialEq

structaster_ui::transform::InverseAffine2D

pub struct InverseAffine2D(..)

Methods

  • fn point(self, point: [f64; 2]) -> Result<[f64; 2], TransformError>
  • fn vector(self, delta: [f64; 2]) -> Result<[f64; 2], TransformError>

Trait implementations: Clone, Copy, Debug, PartialEq, StructuralPartialEq

structaster_ui::transform::PaintTransform

pub struct PaintTransform { /* see fields */ }

Methods

  • fn is_identity(self) -> bool — Whether appearance is unchanged for every arranged box. Pivot is immaterial when translation/rotation/scale are identity.
  • fn from_matrix(matrix: Affine2D) -> Self — Authored node-local appearance matrix. Arranged box translation applies outside this matrix; no layout size or sibling position is changed. The matrix already includes any desired pivot. Singular maps are valid paint descriptions and retain the existing noninteractive policy.
  • fn new(translation: [f64; 2], scale: [f64; 2], turns: f64, pivot: Pivot) -> Result<Self, TransformError>
  • fn for_box(self, bounds: LogicalRect) -> Result<Affine2D, TransformError> — Includes arranged box translation. Rotation/scale do not change layout. Maps node-local coordinates to parent-local paint coordinates.

Trait implementations: Clone, Copy, Debug, Default, PartialEq, StructuralPartialEq

Enums

enumaster_ui::transform::Pivot

pub enum Pivot { Center, Logical, Fraction }

Variants

  • Center
  • Logical
  • Fraction — Fractions may lie outside the box. Zero is the authored top-left.

Trait implementations: Clone, Copy, Debug, Default, PartialEq, StructuralPartialEq

enumaster_ui::transform::TransformError

pub enum TransformError { NonFinite, NumericalRange, Singular }

Variants

  • NonFinite
  • NumericalRange
  • Singular

Trait implementations: Clone, Copy, Debug, Display, Eq, Error, From<TransformError>, PartialEq, StructuralPartialEq