Struct ux::ActorBox [−][src]
pub struct ActorBox(_);
Implementations
impl ActorBox
[src]
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_
ActorBox
es
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 PartialOrd<ActorBox> for ActorBox
[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) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl StaticType for ActorBox
[src]
impl StaticType for ActorBox
[src]pub fn static_type() -> Type
[src]
Auto Trait Implementations
impl RefUnwindSafe for ActorBox
impl RefUnwindSafe for ActorBox
impl UnwindSafe for ActorBox
impl UnwindSafe for ActorBox
Blanket Implementations
impl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
[src]
impl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
[src]pub fn into_color(self) -> To
[src]
impl<T> ToSendValue for T where
T: SetValue + Send + ToValue + ?Sized,
[src]
impl<T> ToSendValue for T where
T: SetValue + Send + ToValue + ?Sized,
[src]pub fn to_send_value(&self) -> SendValue
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,