pub struct WindowSize {
pub dimensions: LogicalSize,
pub hidpi_factor: f32,
pub winit_hidpi_factor: f32,
pub min_dimensions: Option<LogicalSize>,
pub max_dimensions: Option<LogicalSize>,
}
Fields§
§dimensions: LogicalSize
Width and height of the window, in logical units (may not correspond to the physical on-screen size)
hidpi_factor: f32
DPI factor of the window
winit_hidpi_factor: f32
(Internal only, unused): winit HiDPI factor
min_dimensions: Option<LogicalSize>
Minimum dimensions of the window
max_dimensions: Option<LogicalSize>
Maximum dimensions of the window
Implementations§
Source§impl WindowSize
impl WindowSize
Sourcepub fn get_logical_size(&self) -> LogicalSize
pub fn get_logical_size(&self) -> LogicalSize
Get the actual logical size
pub fn get_physical_size(&self) -> PhysicalSize<u32>
Sourcepub fn get_reverse_logical_size(&self) -> LogicalSize
pub fn get_reverse_logical_size(&self) -> LogicalSize
Get a size that is usually smaller than the logical one, so that the winit DPI factor is compensated for.
Trait Implementations§
Source§impl Clone for WindowSize
impl Clone for WindowSize
Source§fn clone(&self) -> WindowSize
fn clone(&self) -> WindowSize
Returns a copy of the value. Read more
1.0.0 · 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 WindowSize
impl Debug for WindowSize
Source§impl Default for WindowSize
impl Default for WindowSize
Source§impl PartialEq for WindowSize
impl PartialEq for WindowSize
Source§impl PartialOrd for WindowSize
impl PartialOrd for WindowSize
impl Copy for WindowSize
impl StructuralPartialEq for WindowSize
Auto Trait Implementations§
impl Freeze for WindowSize
impl RefUnwindSafe for WindowSize
impl Send for WindowSize
impl Sync for WindowSize
impl Unpin for WindowSize
impl UnwindSafe for WindowSize
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)