Struct ux::ActorBox [−][src]
pub struct ActorBox(_);
Implementations
impl ActorBox[src]
pub fn new(x_1: f32, y_1: f32, x_2: f32, y_2: f32) -> ActorBox[src]
Allocates a new ActorBox using the passed coordinates
for the top left and bottom right points.
This function is the logical equivalent of:
actor_box_init (actor_box_alloc (),
x_1, y_1,
x_2, y_2);
x_1
X coordinate of the top left point
y_1
Y coordinate of the top left point
x_2
X coordinate of the bottom right point
y_2
Y coordinate of the bottom right point
Returns
the newly allocated ActorBox.
Use ActorBox::free to free the resources
pub fn contains(&self, x: f32, y: f32) -> bool[src]
Checks whether a point with x, y coordinates is contained
withing self
x
X coordinate of the point
y
Y coordinate of the point
Returns
true if the point is contained by the ActorBox
pub fn get_area(&self) -> f32[src]
pub fn get_height(&self) -> f32[src]
pub fn get_origin(&self) -> (f32, f32)[src]
Retrieves the origin of self
x
return location for the X coordinate, or None
y
return location for the Y coordinate, or None
pub fn get_size(&self) -> (f32, f32)[src]
Retrieves the size of self
width
return location for the width, or None
height
return location for the height, or None
pub fn get_width(&self) -> f32[src]
pub fn get_x(&self) -> f32[src]
pub fn get_y(&self) -> f32[src]
pub fn init(
&mut self,
x_1: f32,
y_1: f32,
x_2: f32,
y_2: f32
) -> Option<ActorBox>[src]
&mut self,
x_1: f32,
y_1: f32,
x_2: f32,
y_2: f32
) -> Option<ActorBox>
Initializes self with the given coordinates.
x_1
X coordinate of the top left point
y_1
Y coordinate of the top left point
x_2
X coordinate of the bottom right point
y_2
Y coordinate of the bottom right point
Returns
the initialized ActorBox
pub fn init_rect(&mut self, x: f32, y: f32, width: f32, height: f32)[src]
Initializes self with the given origin and size.
x
X coordinate of the origin
y
Y coordinate of the origin
width
width of the box
height
height of the box
pub fn interpolate(&self, final_: &ActorBox, progress: f64) -> ActorBox[src]
Interpolates between self and final_ ActorBoxes
using progress
final_
the final ActorBox
progress
the interpolation progress
result
return location for the interpolation
pub fn set_origin(&mut self, x: f32, y: f32)[src]
Changes the origin of self, maintaining the size of the ActorBox.
x
the X coordinate of the new origin
y
the Y coordinate of the new origin
pub fn set_size(&mut self, width: f32, height: f32)[src]
Sets the size of self, maintaining the origin of the ActorBox.
width
the new width
height
the new height
pub fn union(&self, b: &ActorBox) -> ActorBox[src]
Unions the two boxes self and b and stores the result in result.
b
the second ActorBox
result
the ActorBox representing a union
of self and b
pub fn alloc() -> Option<ActorBox>[src]
Allocates a new ActorBox.
Returns
the newly allocated ActorBox.
Use ActorBox::free to free its resources
Trait Implementations
impl Clone for ActorBox[src]
impl Debug for ActorBox[src]
impl Eq for ActorBox[src]
impl Ord for ActorBox[src]
pub fn cmp(&self, other: &ActorBox) -> Ordering[src]
#[must_use]pub fn max(self, other: Self) -> Self1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self1.50.0[src]
impl PartialEq<ActorBox> for ActorBox[src]
pub fn eq(&self, other: &ActorBox) -> bool[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool1.0.0[src]
impl PartialOrd<ActorBox> for ActorBox[src]
pub fn partial_cmp(&self, other: &ActorBox) -> Option<Ordering>[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool1.0.0[src]
impl StaticType for ActorBox[src]
pub fn static_type() -> Type[src]
Auto Trait Implementations
impl RefUnwindSafe for ActorBox
impl !Send for ActorBox
impl !Sync for ActorBox
impl Unpin for ActorBox
impl UnwindSafe for ActorBox
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T> ToSendValue for T where
T: SetValue + Send + ToValue + ?Sized, [src]
T: SetValue + Send + ToValue + ?Sized,
pub fn to_send_value(&self) -> SendValue[src]
impl<T> ToValue for T where
T: SetValue + ?Sized, [src]
T: SetValue + ?Sized,
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.
pub 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>,