Clutter.ActorBox¶
Fields¶
Name |
Type |
Access |
Description |
---|---|---|---|
x1 |
r/w |
X coordinate of the top left corner |
|
x2 |
r/w |
X coordinate of the bottom right corner |
|
y1 |
r/w |
Y coordinate of the top left corner |
|
y2 |
r/w |
Y coordinate of the bottom right corner |
Methods¶
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- class Clutter.ActorBox¶
Bounding box of an actor. The coordinates of the top left and right bottom corners of an actor. The coordinates of the two points are expressed in pixels with sub-pixel precision
- classmethod alloc()¶
- Returns:
the newly allocated
Clutter.ActorBox
. UseClutter.ActorBox.free
() to free its resources- Return type:
Allocates a new
Clutter.ActorBox
.New in version 1.12.
- classmethod new(x_1, y_1, x_2, y_2)¶
- Parameters:
- Returns:
the newly allocated
Clutter.ActorBox
. UseClutter.ActorBox.free
() to free the resources- Return type:
Allocates a new
Clutter.ActorBox
using the passed coordinates for the top left and bottom right points.This function is the logical equivalent of:
clutter_actor_box_init (clutter_actor_box_alloc (), x_1, y_1, x_2, y_2);
New in version 1.0.
- clamp_to_pixel()¶
Clamps the components of self to the nearest integer
New in version 1.2.
- contains(x, y)¶
- Parameters:
- Returns:
True
if the point is contained by theClutter.ActorBox
- Return type:
Checks whether a point with x, y coordinates is contained withing self
New in version 1.0.
- copy()¶
- Returns:
a newly allocated copy of
Clutter.ActorBox
. UseClutter.ActorBox.free
() to free the allocated resources- Return type:
Copies self
New in version 1.0.
- equal(box_b)¶
- Parameters:
box_b (
Clutter.ActorBox
) – aClutter.ActorBox
- Returns:
True
if the passedClutter.ActorBox
are equal- Return type:
Checks self and box_b for equality
New in version 1.0.
- free()¶
Frees a
Clutter.ActorBox
allocated usingClutter.ActorBox.new
() orClutter.ActorBox.copy
()New in version 1.0.
- from_vertices(verts)¶
- Parameters:
verts ([
Clutter.Vertex
]) – array of fourClutter.Vertex
Calculates the bounding box represented by the four vertices; for details of the vertex array see
Clutter.Actor.get_abs_allocation_vertices
().New in version 1.0.
- get_area()¶
- Returns:
the area of a
Clutter.ActorBox
, in pixels- Return type:
Retrieves the area of self
New in version 1.0.
- get_height()¶
- Returns:
the height of the box
- Return type:
Retrieves the height of the self
New in version 1.0.
- get_origin()¶
- Returns:
- Return type:
Retrieves the origin of self
New in version 1.0.
- get_size()¶
- Returns:
- Return type:
Retrieves the size of self
New in version 1.0.
- get_width()¶
- Returns:
the width of the box
- Return type:
Retrieves the width of the self
New in version 1.0.
- get_x()¶
- Returns:
the X coordinate of the origin
- Return type:
Retrieves the X coordinate of the origin of self
New in version 1.0.
- get_y()¶
- Returns:
the Y coordinate of the origin
- Return type:
Retrieves the Y coordinate of the origin of self
New in version 1.0.
- init(x_1, y_1, x_2, y_2)¶
- Parameters:
- Returns:
the initialized
Clutter.ActorBox
- Return type:
Initializes self with the given coordinates.
New in version 1.10.
- init_rect(x, y, width, height)¶
- Parameters:
Initializes self with the given origin and size.
New in version 1.10.
- interpolate(final, progress)¶
- Parameters:
final (
Clutter.ActorBox
) – the finalClutter.ActorBox
progress (
float
) – the interpolation progress
- Returns:
return location for the interpolation
- Return type:
result:
Clutter.ActorBox
Interpolates between self and final
Clutter.ActorBox
es using progressNew in version 1.2.
- set_origin(x, y)¶
- Parameters:
Changes the origin of self, maintaining the size of the
Clutter.ActorBox
.New in version 1.6.
- set_size(width, height)¶
-
Sets the size of self, maintaining the origin of the
Clutter.ActorBox
.New in version 1.6.
- union(b)¶
- Parameters:
b (
Clutter.ActorBox
) – the secondClutter.ActorBox
- Returns:
the
Clutter.ActorBox
representing a union of self and b- Return type:
result:
Clutter.ActorBox
Unions the two boxes self and b and stores the result in result.
New in version 1.4.