cluttermm: Clutter::Point Class Reference

A Clutter::Point is a 2D point in space. More...

Public Member Functions

 Point (ClutterPoint* gobject, bool make_a_copy=true)
 
 Point (const Point& other)
 
Pointoperator= (const Point& other)
 
 ~Point ()
 
void swap (Point& other)
 
ClutterPoint* gobj ()
 Provides access to the underlying C instance. More...

 
const ClutterPoint* gobj () const
 Provides access to the underlying C instance. More...

 
ClutterPoint* gobj_copy () const
 Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs. More...

 
 Point (float x=0, float y=0)
 Constructor. More...

 
 Point (int x, int y)
 
 Point (double x, double y)
 
float distance (const Point& b, float& x_distance, float& y_distance) const
 Computes the distance between two Clutter::Point. More...

 
float get_x () const
 
float get_y () const
 
void set_x (const float& value)
 
void set_y (const float& value)
 

Static Public Member Functions

static GType get_type ()
 Get the GType for this class, for use with the underlying GObject type system. More...

 

Protected Attributes

ClutterPoint* gobject_
 

Related Functions

(Note that these are not member functions.)

bool operator== (const Point& lhs, const Point& rhs)
 
bool operator!= (const Point& lhs, const Point& rhs)
 
void swap (Point& lhs, Point& rhs)
 
Clutter::Point wrap (ClutterPoint* object, bool take_copy=false)
 A Glib::wrap() method for this object. More...

 

Detailed Description

A Clutter::Point is a 2D point in space.

It is used to return points, either in absolute coordinates or relative, depending on the method.

Constructor & Destructor Documentation

Clutter::Point::Point ( ClutterPoint *  gobject,
bool  make_a_copy = true 
)
explicit
Clutter::Point::Point ( const Point other)
Clutter::Point::~Point ( )
Clutter::Point::Point ( float  x = 0,
float  y = 0 
)
explicit

Constructor.

Clutter::Point::Point ( int  x,
int  y 
)
Clutter::Point::Point ( double  x,
double  y 
)

Member Function Documentation

float Clutter::Point::distance ( const Point b,
float &  x_distance,
float &  y_distance 
) const

Computes the distance between two Clutter::Point.

Since cluttermm 1.12:
Parameters
bA Clutter::Point.
x_distanceReturn location for the horizontal distance between the points.
y_distanceReturn location for the vertical distance between the points.
Returns
The distance between the points.
static GType Clutter::Point::get_type ( )
static

Get the GType for this class, for use with the underlying GObject type system.

float Clutter::Point::get_x ( ) const
float Clutter::Point::get_y ( ) const
ClutterPoint* Clutter::Point::gobj ( )
inline

Provides access to the underlying C instance.

const ClutterPoint* Clutter::Point::gobj ( ) const
inline

Provides access to the underlying C instance.

ClutterPoint* Clutter::Point::gobj_copy ( ) const

Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs.

Point& Clutter::Point::operator= ( const Point other)
void Clutter::Point::set_x ( const float &  value)
void Clutter::Point::set_y ( const float &  value)
void Clutter::Point::swap ( Point other)

Friends And Related Function Documentation

bool operator!= ( const Point lhs,
const Point rhs 
)
related
Parameters
lhsThe left-hand side
rhsThe right-hand side
Returns
The result
bool operator== ( const Point lhs,
const Point rhs 
)
related
Parameters
lhsThe left-hand side
rhsThe right-hand side
Returns
The result
void swap ( Point lhs,
Point rhs 
)
related
Parameters
lhsThe left-hand side
rhsThe right-hand side
Clutter::Point wrap ( ClutterPoint *  object,
bool  take_copy = false 
)
related

A Glib::wrap() method for this object.

Parameters
objectThe C instance.
take_copyFalse if the result should take ownership of the C instance. True if it should take a new copy or ref.
Returns
A C++ instance that wraps this C instance.

Member Data Documentation

ClutterPoint* Clutter::Point::gobject_
protected

The documentation for this class was generated from the following file:
  • cluttermm/types.h