pub struct Size { /* private fields */ }
Expand description
A 2D size representation.
Width and height are guarantee to be > 0.
Implementations§
source§impl Size
impl Size
sourcepub fn fit_view_box(&self, vb: &ViewBox) -> Self
pub fn fit_view_box(&self, vb: &ViewBox) -> Self
Fits size into a viewbox.
sourcepub fn to_screen_size(&self) -> ScreenSize
pub fn to_screen_size(&self) -> ScreenSize
Converts Size
to ScreenSize
.
Trait Implementations§
impl Copy for Size
Auto Trait Implementations§
impl RefUnwindSafe for Size
impl Send for Size
impl Sync for Size
impl Unpin for Size
impl UnwindSafe for Size
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