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 |
|
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.Added in version 1.12.
- classmethod clamp_to_pixel(box)¶
- Parameters:
box (
Clutter.ActorBox) – theClutter.ActorBoxto clamp- Returns:
the
Clutter.ActorBoxto clamp- Return type:
box:
Clutter.ActorBox
Clamps the components of box to the nearest integer
Added in version 1.2.
- 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.ActorBoxusing 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);
Added in version 1.0.
- contains(x, y)¶
- Parameters:
- Returns:
Trueif the point is contained by theClutter.ActorBox- Return type:
Checks whether a point with x, y coordinates is contained withing self
Added 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
Added in version 1.0.
- equal(box_b)¶
- Parameters:
box_b (
Clutter.ActorBox) – aClutter.ActorBox- Returns:
Trueif the passedClutter.ActorBoxare equal- Return type:
Checks self and box_b for equality
Added in version 1.0.
- free()¶
Frees a
Clutter.ActorBoxallocated usingClutter.ActorBox.new() orClutter.ActorBox.copy()Added 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().Added in version 1.0.
- get_area()¶
- Returns:
the area of a
Clutter.ActorBox, in pixels- Return type:
Retrieves the area of self
Added in version 1.0.
- get_height()¶
- Returns:
the height of the box
- Return type:
Retrieves the height of the self
Added in version 1.0.
- get_origin()¶
- Returns:
- Return type:
Retrieves the origin of self
Added in version 1.0.
- get_size()¶
- Returns:
- Return type:
Retrieves the size of self
Added in version 1.0.
- get_width()¶
- Returns:
the width of the box
- Return type:
Retrieves the width of the self
Added in version 1.0.
- get_x()¶
- Returns:
the X coordinate of the origin
- Return type:
Retrieves the X coordinate of the origin of self
Added in version 1.0.
- get_y()¶
- Returns:
the Y coordinate of the origin
- Return type:
Retrieves the Y coordinate of the origin of self
Added 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.
Added in version 1.10.
- init_rect(x, y, width, height)¶
- Parameters:
Initializes self with the given origin and size.
Added in version 1.10.
- interpolate(final, progress)¶
- Parameters:
final (
Clutter.ActorBox) – the finalClutter.ActorBoxprogress (
float) – the interpolation progress
- Returns:
return location for the interpolation
- Return type:
result:
Clutter.ActorBox
Interpolates between self and final
Clutter.ActorBoxes using progressAdded in version 1.2.
- set_origin(x, y)¶
- Parameters:
Changes the origin of self, maintaining the size of the
Clutter.ActorBox.Added in version 1.6.
- set_size(width, height)¶
-
Sets the size of self, maintaining the origin of the
Clutter.ActorBox.Added in version 1.6.
- union(b)¶
- Parameters:
b (
Clutter.ActorBox) – the secondClutter.ActorBox- Returns:
the
Clutter.ActorBoxrepresenting a union of self and b- Return type:
result:
Clutter.ActorBox
Unions the two boxes self and b and stores the result in result.
Added in version 1.4.