Clutter.Point

Fields

Name

Type

Access

Description

x

float

r/w

X coordinate, in pixels

y

float

r/w

Y coordinate, in pixels

Methods

class

alloc ()

class

zero ()

copy ()

distance (b)

equals (b)

free ()

init (x, y)

Details

class Clutter.Point

A point in 2D space.

New in version 1.12.

classmethod alloc()
Returns:

the newly allocated Clutter.Point. Use Clutter.Point.free() to free its resources.

Return type:

Clutter.Point

Allocates a new Clutter.Point.

New in version 1.12.

classmethod zero()
Returns:

a point centered in (0, 0); the returned Clutter.Point is owned by Clutter and it should not be modified or freed.

Return type:

Clutter.Point

A point centered at (0, 0).

The returned value can be used as a guard.

New in version 1.12.

copy()
Returns:

a newly allocated Clutter.Point. Use Clutter.Point.free() to free its resources.

Return type:

Clutter.Point

Creates a new Clutter.Point with the same coordinates of self.

New in version 1.12.

distance(b)
Parameters:

b (Clutter.Point) – a Clutter.Point

Returns:

the distance between the points.

x_distance:

return location for the horizontal distance between the points

y_distance:

return location for the vertical distance between the points

Return type:

(float, x_distance: float, y_distance: float)

Computes the distance between two Clutter.Point.

New in version 1.12.

equals(b)
Parameters:

b (Clutter.Point) – the second Clutter.Point to compare

Returns:

True if the Clutter.Points are equal

Return type:

bool

Compares two Clutter.Point for equality.

New in version 1.12.

free()

Frees the resources allocated for self.

New in version 1.12.

init(x, y)
Parameters:
  • x (float) – the X coordinate of the point

  • y (float) – the Y coordinate of the point

Returns:

the initialized Clutter.Point

Return type:

Clutter.Point

Initializes self with the given coordinates.

New in version 1.12.