[−][src]Struct resvg::ScreenSize
A 2D screen size representation.
Fields
width: u32
height: u32
Methods
impl ScreenSize
[src]
impl ScreenSize
pub fn new(width: u32, height: u32) -> Self
[src]
pub fn new(width: u32, height: u32) -> Self
Creates a new ScreenSize
from values.
pub fn scale_to(&self, to: Self) -> Self
[src]
pub fn scale_to(&self, to: Self) -> Self
Scales current size to specified size.
pub fn expand_to(&self, to: ScreenSize) -> ScreenSize
[src]
pub fn expand_to(&self, to: ScreenSize) -> ScreenSize
Expands current size to specified size.
pub fn to_size(&self) -> Size
[src]
pub fn to_size(&self) -> Size
Converts the current ScreenSize
to Size
.
Trait Implementations
impl PartialEq<ScreenSize> for ScreenSize
[src]
impl PartialEq<ScreenSize> for ScreenSize
fn eq(&self, other: &ScreenSize) -> bool
[src]
fn eq(&self, other: &ScreenSize) -> bool
fn ne(&self, other: &ScreenSize) -> bool
[src]
fn ne(&self, other: &ScreenSize) -> bool
impl From<(u32, u32)> for ScreenSize
[src]
impl From<(u32, u32)> for ScreenSize
impl Clone for ScreenSize
[src]
impl Clone for ScreenSize
fn clone(&self) -> ScreenSize
[src]
fn clone(&self) -> ScreenSize
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Copy for ScreenSize
[src]
impl Copy for ScreenSize
impl Display for ScreenSize
[src]
impl Display for ScreenSize
impl Debug for ScreenSize
[src]
impl Debug for ScreenSize
Auto Trait Implementations
impl Send for ScreenSize
impl Send for ScreenSize
impl Sync for ScreenSize
impl Sync for ScreenSize
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
impl<T> ToString for T where
T: Display + ?Sized,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId