Struct tiny_skia_path::Size
source · pub struct Size { /* private fields */ }
Expand description
Implementations§
source§impl Size
impl Size
sourcepub fn from_wh(width: f32, height: f32) -> Option<Self>
pub fn from_wh(width: f32, height: f32) -> Option<Self>
Creates a new Size
from width and height.
sourcepub fn to_int_size(&self) -> IntSize
pub fn to_int_size(&self) -> IntSize
Converts into IntSize
.
sourcepub fn to_rect(&self, x: f32, y: f32) -> Option<Rect>
pub fn to_rect(&self, x: f32, y: f32) -> Option<Rect>
Converts the current size to Rect
at provided position.
sourcepub fn to_non_zero_rect(&self, x: f32, y: f32) -> NonZeroRect
pub fn to_non_zero_rect(&self, x: f32, y: f32) -> NonZeroRect
Converts the current size to NonZeroRect
at provided position.
Trait Implementations§
impl Copy for Size
impl StructuralPartialEq for Size
Auto Trait Implementations§
impl Freeze for Size
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
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
)