Expand description
Ported from Arc (MIT) © 2026 Elia Kuratli
Hybrid Transform primitives (see docs/porting/P0-DECISIONS.md §2):
- Translation: exact via
Window::with_element_offsetor positioning - Box scaling: analytical bounds + corner-radius scaling around
TransformOrigin - SVG/Icon rotation & scale: native GPUI
TransformationMatrix
Structs§
- Transform2D
- Complete 2D transform description for Arc elements.
- Transform
Origin - Normalized transform origin (
(0.5, 0.5)= center,(0.5, 0.0)= top-center,(0.0, 0.5)= left).
Functions§
- scaled_
bounds - Scales
baseby(scale_x, scale_y)keeping the normalizedoriginpoint fixed. - scaled_
corners - Scales corner radii proportionally to the smaller axis scale factor.
- svg_
transform_ matrix - Builds a native GPUI
TransformationMatrixfor SVG/icon rotation & scaling.