|
gtkmm 4.15.0
|
A point with 2 coordinates. More...
#include <gdkmm/graphene_point.h>
Public Member Functions | |
| Point () | |
| Constructs an invalid object. | |
| Point (graphene_point_t *castitem, bool make_a_copy=false) | |
| Point (const Point &src) | |
| Point & | operator= (const Point &src) |
| Point (Point &&other) noexcept | |
| Point & | operator= (Point &&other) noexcept |
| ~Point () noexcept | |
| void | swap (Point &other) noexcept |
| graphene_point_t * | gobj () |
| const graphene_point_t * | gobj () const |
| graphene_point_t * | 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 (float x, float y) | |
| operator bool () const | |
| Checks if this instance is valid. | |
| float | get_x () const |
| void | set_x (const float & value) |
| float | get_y () const |
| void | set_y (const float & value) |
| bool | equal (const Point & b) const |
| Checks if the two points a and b point to the same coordinates. | |
| bool | near (const Point & b, float epsilon) const |
| Checks whether the two points a and b are within the threshold of epsilon. | |
Protected Attributes | |
| graphene_point_t * | gobject_ |
Related Symbols | |
(Note that these are not member symbols.) | |
| void | swap (Point &lhs, Point &rhs) noexcept |
| Gdk::Graphene::Point | wrap (graphene_point_t *object, bool take_copy=false) |
| A Glib::wrap() method for this object. | |
A point with 2 coordinates.
Gdk::Graphene::Point is a data structure capable of describing a point with two coordinates.
| Gdk::Graphene::Point::Point | ( | ) |
Constructs an invalid object.
E.g. for output arguments to methods. There is not much you can do with the object before it has been assigned a valid value.
|
explicit |
|
noexcept |
|
noexcept |
Checks if the two points a and b point to the same coordinates.
This function accounts for floating point fluctuations; if you want to control the fuzziness of the match, you can use graphene_point_near() instead.
| b | A graphene_point_t. |
true if the points have the same coordinates. | float Gdk::Graphene::Point::get_x | ( | ) | const |
| float Gdk::Graphene::Point::get_y | ( | ) | const |
|
inline |
|
inline |
| graphene_point_t * Gdk::Graphene::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.
Checks whether the two points a and b are within the threshold of epsilon.
| b | A graphene_point_t. |
| epsilon | Threshold between the two points. |
true if the distance is within epsilon.
|
explicit |
Checks if this instance is valid.
It is valid if and only if it contains a value. For instance,
| lhs | The left-hand side |
| rhs | The right-hand side |
|
related |
A Glib::wrap() method for this object.
| object | The C instance. |
| take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref. |
|
protected |