|
gtkmm 4.23.2
|
Performs measurements on paths such as determining the length of the path. More...
#include <gskmm/pathmeasure.h>
Public Member Functions | |
| void | reference () const |
| Increment the reference count for this object. | |
| void | unreference () const |
| Decrement the reference count for this object. | |
| GskPathMeasure * | gobj () |
| Provides access to the underlying C instance. | |
| const GskPathMeasure * | gobj () const |
| Provides access to the underlying C instance. | |
| GskPathMeasure * | gobj_copy () const |
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. | |
| PathMeasure ()=delete | |
| PathMeasure (const PathMeasure &)=delete | |
| PathMeasure & | operator= (const PathMeasure &)=delete |
| Glib::RefPtr< Path > | get_path () const |
| Returns the path that the measure was created for. | |
| float | get_tolerance () const |
| Returns the tolerance that the measure was created with. | |
| float | get_length () const |
| Gets the length of the path being measured. | |
| std::optional< PathPoint > | get_point (float distance) |
| Gets the point at the given distance into the path. | |
Static Public Member Functions | |
| static Glib::RefPtr< PathMeasure > | create (const Glib::RefPtr< const Path > & path) |
| Creates a measure object for the given path with the default tolerance. | |
| static Glib::RefPtr< PathMeasure > | create (const Glib::RefPtr< const Path > & path, float tolerance) |
| Creates a measure object for the given path and tolerance. | |
Protected Member Functions | |
| void | operator delete (void *, std::size_t) |
Related Symbols | |
(Note that these are not member symbols.) | |
| Glib::RefPtr< Gsk::PathMeasure > | wrap (GskPathMeasure * object, bool take_copy=false) |
| A Glib::wrap() method for this object. | |
Performs measurements on paths such as determining the length of the path.
Many measuring operations require sampling the path length at intermediate points. Therefore, a Gsk::PathMeasure has a tolerance that determines what precision is required for such approximations.
|
delete |
|
delete |
|
static |
Creates a measure object for the given path with the default tolerance.
| path | The path to measure. |
|
static |
Creates a measure object for the given path and tolerance.
| path | The path to measure. |
| tolerance | The tolerance for measuring operations. |
| float Gsk::PathMeasure::get_length | ( | ) | const |
Gets the length of the path being measured.
The length is cached, so this function does not do any work.
| Glib::RefPtr< Path > Gsk::PathMeasure::get_path | ( | ) | const |
| std::optional< PathPoint > Gsk::PathMeasure::get_point | ( | float | distance | ) |
Gets the point at the given distance into the path.
An empty path has no points, so no value is returned in that case.
| distance | The distance. |
| float Gsk::PathMeasure::get_tolerance | ( | ) | const |
Returns the tolerance that the measure was created with.
| GskPathMeasure * Gsk::PathMeasure::gobj | ( | ) |
Provides access to the underlying C instance.
| const GskPathMeasure * Gsk::PathMeasure::gobj | ( | ) | const |
Provides access to the underlying C instance.
| GskPathMeasure * Gsk::PathMeasure::gobj_copy | ( | ) | const |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
|
protected |
|
delete |
| void Gsk::PathMeasure::reference | ( | ) | const |
Increment the reference count for this object.
You should never need to do this manually - use the object via a RefPtr instead.
| void Gsk::PathMeasure::unreference | ( | ) | const |
Decrement the reference count for this object.
You should never need to do this manually - use the object via a RefPtr instead.
|
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. |