pub struct VisualTransformProps {
pub layout: LayoutStyle,
pub transform: Transform2D,
}Expand description
Paint-only transform wrapper for declarative element subtrees.
This applies a SceneOp::PushTransform / PopTransform around the subtree during painting,
without affecting layout, hit-testing, or pointer event coordinates.
This is intentionally similar to GPUI’s with_transformation(...) semantics for elements like
Svg: it is useful for spinners and decorative animations, and is cheap to optimize because it
does not require inverse mapping during hit-testing.
Fields§
§layout: LayoutStyle§transform: Transform2DA transform expressed in the element’s local coordinate space.
The runtime composes this around the element’s bounds origin so that local transforms can be
expressed in px relative to the element (e.g. rotate around Point(Px(w/2), Px(h/2))).
Trait Implementations§
Source§impl Clone for VisualTransformProps
impl Clone for VisualTransformProps
Source§fn clone(&self) -> VisualTransformProps
fn clone(&self) -> VisualTransformProps
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for VisualTransformProps
impl Debug for VisualTransformProps
Source§impl Default for VisualTransformProps
impl Default for VisualTransformProps
Source§fn default() -> VisualTransformProps
fn default() -> VisualTransformProps
Returns the “default value” for a type. Read more
impl Copy for VisualTransformProps
Auto Trait Implementations§
impl Freeze for VisualTransformProps
impl RefUnwindSafe for VisualTransformProps
impl Send for VisualTransformProps
impl Sync for VisualTransformProps
impl Unpin for VisualTransformProps
impl UnsafeUnpin for VisualTransformProps
impl UnwindSafe for VisualTransformProps
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more