#[repr(C)]pub struct Size {
pub width: scalar,
pub height: scalar,
}
Fields§
§width: scalar
§height: scalar
Implementations§
Source§impl Size
impl Size
pub const fn new(w: scalar, h: scalar) -> Size
pub const fn from_isize(src: ISize) -> Size
pub const fn new_empty() -> Self
pub fn set(&mut self, w: scalar, h: scalar)
pub fn is_zero(self) -> bool
pub fn is_empty(self) -> bool
pub fn set_empty(&mut self)
pub fn equals(self, w: scalar, h: scalar) -> bool
pub fn to_round(self) -> ISize
pub fn to_ceil(self) -> ISize
pub fn to_floor(self) -> ISize
Trait Implementations§
Source§impl AddAssign<Size> for Point
impl AddAssign<Size> for Point
Source§fn add_assign(&mut self, rhs: Size)
fn add_assign(&mut self, rhs: Size)
Performs the
+=
operation. Read moreSource§impl DivAssign<f32> for Size
impl DivAssign<f32> for Size
Source§fn div_assign(&mut self, rhs: scalar)
fn div_assign(&mut self, rhs: scalar)
Performs the
/=
operation. Read moreSource§impl MulAssign<f32> for Size
impl MulAssign<f32> for Size
Source§fn mul_assign(&mut self, rhs: scalar)
fn mul_assign(&mut self, rhs: scalar)
Performs the
*=
operation. Read moreSource§impl SubAssign<Size> for Point
impl SubAssign<Size> for Point
Source§fn sub_assign(&mut self, rhs: Size)
fn sub_assign(&mut self, rhs: Size)
Performs the
-=
operation. Read moreimpl 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