Struct iced_graphics::Viewport
source · [−]pub struct Viewport { /* private fields */ }
Expand description
A viewing region for displaying computer graphics.
Implementations
sourceimpl Viewport
impl Viewport
sourcepub fn with_physical_size(size: Size<u32>, scale_factor: f64) -> Viewport
pub fn with_physical_size(size: Size<u32>, scale_factor: f64) -> Viewport
Creates a new Viewport
with the given physical dimensions and scale
factor.
sourcepub fn physical_size(&self) -> Size<u32>
pub fn physical_size(&self) -> Size<u32>
Returns the physical size of the Viewport
.
sourcepub fn physical_width(&self) -> u32
pub fn physical_width(&self) -> u32
Returns the physical width of the Viewport
.
sourcepub fn physical_height(&self) -> u32
pub fn physical_height(&self) -> u32
Returns the physical height of the Viewport
.
sourcepub fn logical_size(&self) -> Size<f32>
pub fn logical_size(&self) -> Size<f32>
Returns the logical size of the Viewport
.
sourcepub fn scale_factor(&self) -> f64
pub fn scale_factor(&self) -> f64
Returns the scale factor of the Viewport
.
sourcepub fn projection(&self) -> Transformation
pub fn projection(&self) -> Transformation
Returns the projection transformation of the Viewport
.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Viewport
impl Send for Viewport
impl Sync for Viewport
impl Unpin for Viewport
impl UnwindSafe for Viewport
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more