pub struct Rect(/* private fields */);
Expand description
Represents a rectangle. (JavaScript docs)
Implementations§
Source§impl Rect
impl Rect
Sourcepub fn get_x(&self) -> f64
pub fn get_x(&self) -> f64
Represents the x coordinate of the DOMRect’s origin (JavaScript docs)
Sourcepub fn get_y(&self) -> f64
pub fn get_y(&self) -> f64
Represents the y coordinate of the DOMRect’s origin. (JavaScript docs)
Sourcepub fn get_width(&self) -> f64
pub fn get_width(&self) -> f64
Represents the width of the DOMRect. (JavaScript docs)
Sourcepub fn get_height(&self) -> f64
pub fn get_height(&self) -> f64
Represents the height of the DOMRect. (JavaScript docs)
Sourcepub fn get_top(&self) -> f64
pub fn get_top(&self) -> f64
Returns the top coordinate value of the DOMRect. (Has the same value as y, or y + height if height is negative.) (JavaScript docs)
Sourcepub fn get_right(&self) -> f64
pub fn get_right(&self) -> f64
Returns the right coordinate value of the DOMRect. (Has the same value as x + width, or x if width is negative.) (JavaScript docs)
Sourcepub fn get_bottom(&self) -> f64
pub fn get_bottom(&self) -> f64
Returns the bottom coordinate value of the DOMRect. (Has the same value as y + height, or y if height is negative.) (JavaScript docs)
Sourcepub fn get_left(&self) -> f64
pub fn get_left(&self) -> f64
Returns the left coordinate value of the DOMRect. (Has the same value as x, or x + width if width is negative.) (JavaScript docs)