pub struct FitViewComputeOptions {
pub viewport_width_px: f32,
pub viewport_height_px: f32,
pub node_origin: (f32, f32),
pub padding: f32,
pub margin_px_fallback: f32,
pub min_zoom: f32,
pub max_zoom: f32,
}Fields§
§viewport_width_px: f32Viewport width in logical px.
viewport_height_px: f32Viewport height in logical px.
node_origin: (f32, f32)Node origin (anchor) used to interpret FitViewNodeInfo.pos.
When (0.0, 0.0), pos is treated as the node’s top-left.
When (0.5, 0.5), pos is treated as the node’s center.
padding: f32Extra padding as a fraction of viewport size (0.0 .. 0.45 recommended).
When 0.0, margin_px_fallback is used instead.
margin_px_fallback: f32Fixed margin in logical px used when padding == 0.0.
min_zoom: f32Minimum zoom clamp.
max_zoom: f32Maximum zoom clamp.
Implementations§
Source§impl FitViewComputeOptions
impl FitViewComputeOptions
pub fn normalized(self) -> Option<Self>
Trait Implementations§
Source§impl Clone for FitViewComputeOptions
impl Clone for FitViewComputeOptions
Source§fn clone(&self) -> FitViewComputeOptions
fn clone(&self) -> FitViewComputeOptions
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 FitViewComputeOptions
Auto Trait Implementations§
impl Freeze for FitViewComputeOptions
impl RefUnwindSafe for FitViewComputeOptions
impl Send for FitViewComputeOptions
impl Sync for FitViewComputeOptions
impl Unpin for FitViewComputeOptions
impl UnsafeUnpin for FitViewComputeOptions
impl UnwindSafe for FitViewComputeOptions
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