GooCanvas.CanvasPoints¶
Fields¶
Name |
Type |
Access |
Description |
---|---|---|---|
coords |
r/w |
the coordinates of the points, in pairs. |
|
num_points |
r/w |
the number of points. |
|
ref_count |
r/w |
the reference count of the struct. |
Methods¶
class |
|
|
|
|
|
|
|
|
Details¶
- class GooCanvas.CanvasPoints¶
#GooCairoPoints represents an array of points.
- classmethod new(num_points)¶
- Parameters:
num_points (
int
) – the number of points to create space for.- Returns:
a new
GooCanvas.CanvasPoints
struct.- Return type:
Creates a new
GooCanvas.CanvasPoints
struct with space for the given number of points. It should be freed withGooCanvas.CanvasPoints.unref
().
- get_point(idx)¶
- Parameters:
idx (
int
) – index of point to get.- Returns:
- x:
location to store x coordinate.
- y:
location to store y coordinate.
- Return type:
Gets the coordinates of a point in the
GooCanvas.CanvasPoints
struct.New in version 2.0.1.
- ref()¶
- Returns:
the
GooCanvas.CanvasPoints
struct.- Return type:
Increments the reference count of the given
GooCanvas.CanvasPoints
struct.
- set_point(idx, x, y)¶
- Parameters:
Sets the coordinates of a point in the
GooCanvas.CanvasPoints
struct.New in version 2.0.1.
- unref()¶
Decrements the reference count of the given
GooCanvas.CanvasPoints
struct, freeing it if the reference count falls to zero.