Struct usvg::Rect [−][src]
A rect representation.
Fields
x: f64
y: f64
width: f64
height: f64
Methods
impl Rect
[src]
impl Rect
pub fn new(x: f64, y: f64, width: f64, height: f64) -> Self
[src]
pub fn new(x: f64, y: f64, width: f64, height: f64) -> Self
Creates a new Rect
from values.
pub fn size(&self) -> Size
[src]
pub fn size(&self) -> Size
Returns rect's size.
pub fn transform(&self, ts: Transform) -> Self
[src]
pub fn transform(&self, ts: Transform) -> Self
Returns transformed rect.
Trait Implementations
impl Clone for Rect
[src]
impl Clone for Rect
fn clone(&self) -> Rect
[src]
fn clone(&self) -> Rect
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 Rect
[src]
impl Copy for Rect
impl PartialEq for Rect
[src]
impl PartialEq for Rect
fn eq(&self, other: &Rect) -> bool
[src]
fn eq(&self, other: &Rect) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rect) -> bool
[src]
fn ne(&self, other: &Rect) -> bool
This method tests for !=
.
impl Debug for Rect
[src]
impl Debug for Rect
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 Rect
[src]
impl Display for Rect
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 From<(f64, f64, f64, f64)> for Rect
[src]
impl From<(f64, f64, f64, f64)> for Rect