use crate::geom::Transform; use crate::library::prelude::*; /// Transform a node without affecting layout. #[derive(Debug, Hash)] pub struct TransformNode { /// Transformation to apply to the contents. pub transform: Transform, /// The node whose contents should be transformed. pub child: LayoutNode, } /// Transform a node by translating it without affecting layout. pub type MoveNode = TransformNode; /// Transform a node by rotating it without affecting layout. pub type RotateNode = TransformNode; /// Transform a node by scaling it without affecting layout. pub type ScaleNode = TransformNode; #[class] impl TransformNode { /// The origin of the transformation. pub const ORIGIN: Spec> = Spec::default(); fn construct(_: &mut Context, args: &mut Args) -> TypResult