pub struct PanZoomTransform {
pub scale: f64,
pub offset: Vec2,
}Expand description
Where the content sits: view = offset + scale · content.
The child’s pod carries exactly affine; a content-space
point (the child’s local coordinates) maps to the view’s local space
through it and back through to_content.
Fields§
§scale: f64The zoom factor: 1.0 is the child’s natural size.
offset: Vec2Where the child’s local origin sits in the view, in view-local px.
Implementations§
Source§impl PanZoomTransform
impl PanZoomTransform
Sourcepub const IDENTITY: PanZoomTransform
pub const IDENTITY: PanZoomTransform
Unscaled, unpanned: the child at the view’s top-left at natural size.
Sourcepub fn to_content(&self, point: Point) -> Point
pub fn to_content(&self, point: Point) -> Point
The content-space point drawn at view-local point.
Trait Implementations§
Source§impl Clone for PanZoomTransform
impl Clone for PanZoomTransform
impl Copy for PanZoomTransform
Source§impl Debug for PanZoomTransform
impl Debug for PanZoomTransform
Source§impl Default for PanZoomTransform
impl Default for PanZoomTransform
Source§impl PartialEq for PanZoomTransform
impl PartialEq for PanZoomTransform
impl StructuralPartialEq for PanZoomTransform
Auto Trait Implementations§
impl Freeze for PanZoomTransform
impl RefUnwindSafe for PanZoomTransform
impl Send for PanZoomTransform
impl Sync for PanZoomTransform
impl Unpin for PanZoomTransform
impl UnsafeUnpin for PanZoomTransform
impl UnwindSafe for PanZoomTransform
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
impl<T> Brush for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
Source§fn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Borrows the value.
Source§fn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.