Struct tiny_skia_path::IntSize
source · pub struct IntSize { /* private fields */ }
Expand description
Implementations§
source§impl IntSize
impl IntSize
sourcepub fn from_wh(width: u32, height: u32) -> Option<Self>
pub fn from_wh(width: u32, height: u32) -> Option<Self>
Creates a new IntSize
from width and height.
sourcepub fn dimensions(&self) -> (u32, u32)
pub fn dimensions(&self) -> (u32, u32)
Returns width and height as a tuple.
sourcepub fn scale_by(&self, factor: f32) -> Option<Self>
pub fn scale_by(&self, factor: f32) -> Option<Self>
Scales current size by the specified factor.
sourcepub fn scale_to_width(&self, new_width: u32) -> Option<Self>
pub fn scale_to_width(&self, new_width: u32) -> Option<Self>
Scales current size to the specified width.
sourcepub fn scale_to_height(&self, new_height: u32) -> Option<Self>
pub fn scale_to_height(&self, new_height: u32) -> Option<Self>
Scales current size to the specified height.
Trait Implementations§
source§impl PartialEq for IntSize
impl PartialEq for IntSize
impl Copy for IntSize
impl StructuralPartialEq for IntSize
Auto Trait Implementations§
impl RefUnwindSafe for IntSize
impl Send for IntSize
impl Sync for IntSize
impl Unpin for IntSize
impl UnwindSafe for IntSize
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