#[repr(C)]pub struct MagnifierParams {
pub center_x: f32,
pub center_y: f32,
pub radius: f32,
pub magnification: f32,
}Expand description
Parameters for magnifier. Default is a lens in the frame center;
move it live via the params handle to sweep it around.
Inside radius the sampling coordinates contract toward the lens
center by a factor that eases (smoothstep) from magnification at
the center to 1 at the rim — a convex lens without a hard edge.
Outside the radius the image is untouched.
Fields§
§center_x: f32Lens center x as a fraction of the width, 0.0..=1.0.
center_y: f32Lens center y as a fraction of the height, 0.0..=1.0.
radius: f32Lens radius as a fraction of the frame height, 0.0..=1.0.
The lens is physically round regardless of aspect.
magnification: f32Peak zoom at the lens center, 1.0..=5.0.
Trait Implementations§
Source§impl Clone for MagnifierParams
impl Clone for MagnifierParams
Source§fn clone(&self) -> MagnifierParams
fn clone(&self) -> MagnifierParams
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 moreimpl Copy for MagnifierParams
Source§impl Debug for MagnifierParams
impl Debug for MagnifierParams
Source§impl Default for MagnifierParams
impl Default for MagnifierParams
Source§impl PartialEq for MagnifierParams
impl PartialEq for MagnifierParams
impl Pod for MagnifierParams
impl StructuralPartialEq for MagnifierParams
Auto Trait Implementations§
impl Freeze for MagnifierParams
impl RefUnwindSafe for MagnifierParams
impl Send for MagnifierParams
impl Sync for MagnifierParams
impl Unpin for MagnifierParams
impl UnsafeUnpin for MagnifierParams
impl UnwindSafe for MagnifierParams
Blanket Implementations§
impl<T> AnyBitPattern for Twhere
T: Pod,
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self.