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).
Enums§
- Reveal
Mask - 空间揭幕的裁剪方式。只负责几何,不负责主题或场景快照。
Functions§
- reveal_
regions - 以横向扫描带描述圆形边界;矩形过渡只产生一个裁剪区。
band_height由宿主按像素密度提供,不在运动层硬编码绘制质量。 - 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.