pub struct ZoomTransform {
pub scale: f64,
pub center_x: f64,
pub center_y: f64,
}Expand description
A scale-about-a-focal-point transform for one composed frame.
The renderer scales the framed screen by scale (>= 1.0) about the
normalized focal point (center_x, center_y) in [0, 1]. At identity
(scale == 1.0) the focal point is irrelevant — no push-in is applied.
Fields§
§scale: f64Zoom factor, >= 1.0. 1.0 is no zoom.
center_x: f64Horizontal focal point, 0.0..=1.0 (0 left, 1 right).
center_y: f64Vertical focal point, 0.0..=1.0 (0 top, 1 bottom).
Implementations§
Source§impl ZoomTransform
impl ZoomTransform
Sourcepub fn is_identity(self) -> bool
pub fn is_identity(self) -> bool
Whether this transform is (approximately) no-zoom.
Trait Implementations§
Source§impl Clone for ZoomTransform
impl Clone for ZoomTransform
Source§fn clone(&self) -> ZoomTransform
fn clone(&self) -> ZoomTransform
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ZoomTransform
impl Debug for ZoomTransform
Source§impl Default for ZoomTransform
impl Default for ZoomTransform
Source§impl PartialEq for ZoomTransform
impl PartialEq for ZoomTransform
Source§fn eq(&self, other: &ZoomTransform) -> bool
fn eq(&self, other: &ZoomTransform) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for ZoomTransform
impl StructuralPartialEq for ZoomTransform
Auto Trait Implementations§
impl Freeze for ZoomTransform
impl RefUnwindSafe for ZoomTransform
impl Send for ZoomTransform
impl Sync for ZoomTransform
impl Unpin for ZoomTransform
impl UnsafeUnpin for ZoomTransform
impl UnwindSafe for ZoomTransform
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