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