mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-12 13:30:19 +00:00
pathpoint: Add some debug API
Add a private gsk_path_point_to_string that can be called in the debugger if you want to see the contents of a GskPathPoint and are too lazy to cast it to GskRealPathPoint yourself.
This commit is contained in:
parent
43b6822eb0
commit
031c0ec3e5
@ -54,6 +54,17 @@ G_DEFINE_BOXED_TYPE (GskPathPoint, gsk_path_point,
|
||||
gsk_path_point_free)
|
||||
|
||||
|
||||
const char *
|
||||
gsk_path_point_to_string (GskPathPoint *point)
|
||||
{
|
||||
GskRealPathPoint *p = (GskRealPathPoint *) point;
|
||||
static char buf[128];
|
||||
g_snprintf (buf, sizeof (buf),
|
||||
"{ .contour = %lu, .idx = %lu, .t = %.9f }",
|
||||
p->contour, p->idx, p->t);
|
||||
return buf;
|
||||
}
|
||||
|
||||
GskPathPoint *
|
||||
gsk_path_point_copy (GskPathPoint *point)
|
||||
{
|
||||
|
@ -14,5 +14,7 @@ struct _GskRealPathPoint
|
||||
|
||||
G_STATIC_ASSERT (sizeof (GskRealPathPoint) <= sizeof (GskPathPoint));
|
||||
|
||||
const char * gsk_path_point_to_string (GskPathPoint *point);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user