pub struct ScaleContext {
pub dpi: u32,
pub os_scale: f32,
pub preference: ScalePreference,
pub scale: UiScale,
pub work_area: WorkArea,
pub preferred_logical_size: Size,
pub physical_window_size: PhysicalSize,
pub compact: bool,
}Fields§
§dpi: u32§os_scale: f32§preference: ScalePreference§scale: UiScale§work_area: WorkArea§preferred_logical_size: Size§physical_window_size: PhysicalSize§compact: boolImplementations§
Source§impl ScaleContext
impl ScaleContext
pub fn resolve( dpi: u32, work_area: WorkArea, preferred_logical_size: Size, preference: ScalePreference, ) -> Self
pub fn same_monitor_metrics(self, other: Self) -> bool
pub fn clamp_origin( self, proposed: PhysicalPoint, size: PhysicalSize, ) -> PhysicalPoint
Trait Implementations§
Source§impl Clone for ScaleContext
impl Clone for ScaleContext
Source§fn clone(&self) -> ScaleContext
fn clone(&self) -> ScaleContext
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 ScaleContext
Source§impl Debug for ScaleContext
impl Debug for ScaleContext
Source§impl PartialEq for ScaleContext
impl PartialEq for ScaleContext
impl StructuralPartialEq for ScaleContext
Auto Trait Implementations§
impl Freeze for ScaleContext
impl RefUnwindSafe for ScaleContext
impl Send for ScaleContext
impl Sync for ScaleContext
impl Unpin for ScaleContext
impl UnsafeUnpin for ScaleContext
impl UnwindSafe for ScaleContext
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