pub struct Viewport {
pub origin: Vec2,
pub size: Vec2,
}Expand description
Numerical minimum and positive extent in the same units as screen queries.
Preparation requires each extent to be at least one logical unit. The maximum
edge is origin + size, rounded to f32; mapping and membership both use those
same rounded edges. Nonfinite, overflowing, or collapsed edges are rejected.
See the module recipe for construction with an offset viewport.
Fields§
§origin: Vec2Minimum X/Y screen coordinate, independent of screen Y direction.
size: Vec2Width/height, each at least one screen unit when prepared.
Trait Implementations§
impl Copy for Viewport
impl StructuralPartialEq for Viewport
Auto Trait Implementations§
impl Freeze for Viewport
impl RefUnwindSafe for Viewport
impl Send for Viewport
impl Sync for Viewport
impl Unpin for Viewport
impl UnwindSafe for Viewport
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