[−][src]Struct orbtk::prelude::utils::Rectangle
Describes a new visual rectangle.
Fields
x: f64
y: f64
Y position of the rectangle.
width: f64
Width of the rectangle.
height: f64
Height of the rectangle.
Methods
impl Rectangle
[src]
pub fn new(x: f64, y: f64, width: f64, height: f64) -> Rectangle
[src]
Create a new rectangle with the given parameters.
pub fn x(&self) -> f64
[src]
Gets x.
pub fn set_x(&mut self, x: f64)
[src]
Sets x.
pub fn y(&self) -> f64
[src]
Gets y.
pub fn set_y(&mut self, y: f64)
[src]
Sets y.
pub fn position(&self) -> (f64, f64)
[src]
Gets position with x and y.
pub fn set_position(&mut self, x: f64, y: f64)
[src]
Sets position with x and y.
pub fn width(&self) -> f64
[src]
Gets the width.
pub fn set_width(&mut self, width: f64)
[src]
Sets the width.
pub fn height(&self) -> f64
[src]
Gets the height.
pub fn set_height(&mut self, height: f64)
[src]
Sets the height.
pub fn size(&self) -> (f64, f64)
[src]
Gets the size with width and height.
pub fn set_size(&mut self, width: f64, height: f64)
[src]
Sets the size with width and height.
pub fn contains(&self, point: (f64, f64)) -> bool
[src]
Check if this rect contains the given point
.
pub fn contains_rect(&self, rect: &Rectangle) -> bool
[src]
pub fn intersects(&self, rect: &Rectangle) -> bool
[src]
Trait Implementations
impl IntoPropertySource<Rectangle> for Rectangle
[src]
fn into_source(self) -> PropertySource<Rectangle>
[src]
impl IntoPropertySource<Rectangle> for (i32, i32, i32, i32)
[src]
fn into_source(self) -> PropertySource<Rectangle>
[src]
impl IntoPropertySource<Rectangle> for (f64, f64, f64, f64)
[src]
fn into_source(self) -> PropertySource<Rectangle>
[src]
impl IntoPropertySource<Rectangle> for Entity
[src]
fn into_source(self) -> PropertySource<Rectangle>
[src]
impl IntoPropertySource<Rectangle> for (String, Entity)
[src]
fn into_source(self) -> PropertySource<Rectangle>
[src]
impl<'_> IntoPropertySource<Rectangle> for (&'_ str, Entity)
[src]
fn into_source(self) -> PropertySource<Rectangle>
[src]
impl Debug for Rectangle
[src]
impl Default for Rectangle
[src]
impl Copy for Rectangle
[src]
impl From<(i32, i32, i32, i32)> for Rectangle
[src]
impl From<(f64, f64, f64, f64)> for Rectangle
[src]
impl PartialEq<Rectangle> for Rectangle
[src]
impl StructuralPartialEq for Rectangle
[src]
impl Clone for Rectangle
[src]
Auto Trait Implementations
impl Send for Rectangle
impl Sync for Rectangle
impl Unpin for Rectangle
impl UnwindSafe for Rectangle
impl RefUnwindSafe for Rectangle
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<E> Component for E where
E: Any,
[src]
E: Any,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,