Struct usvg::Size
[−]
[src]
pub struct Size { pub width: f64, pub height: f64, }
A 2D size representation.
Fields
width: f64
height: f64
Methods
impl Size
[src]
pub fn new(width: f64, height: f64) -> Self
[src]
Creates a new Size
from values.
pub fn to_rect(&self, x: f64, y: f64) -> Rect
[src]
Converts the current size to Rect
at provided position.
Trait Implementations
impl Clone for Size
[src]
fn clone(&self) -> Size
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Copy for Size
[src]
impl PartialEq for Size
[src]
fn eq(&self, __arg_0: &Size) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Size) -> bool
[src]
This method tests for !=
.
impl From<(f64, f64)> for Size
[src]
impl Debug for Size
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more