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]

Retrieves the area of self

Returns

the area of a ActorBox, in pixels

pub fn get_height(&self) -> f32[src]

Retrieves the height of the self

Returns

the height of the box

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]

Retrieves the width of the self

Returns

the width of the box

pub fn get_x(&self) -> f32[src]

Retrieves the X coordinate of the origin of self

Returns

the X coordinate of the origin

pub fn get_y(&self) -> f32[src]

Retrieves the Y coordinate of the origin of self

Returns

the Y coordinate of the origin

pub fn init(
    &mut self,
    x_1: f32,
    y_1: f32,
    x_2: f32,
    y_2: f32
) -> Option<ActorBox>
[src]

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]

impl PartialEq<ActorBox> for ActorBox[src]

impl PartialOrd<ActorBox> for ActorBox[src]

impl StaticType for ActorBox[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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<Fr, To> IntoColor<To> for Fr where
    To: FromColor<Fr>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToSendValue for T where
    T: SetValue + Send + ToValue + ?Sized
[src]

impl<T> ToValue for T where
    T: SetValue + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,