diff --git a/gsk/gskpathpoint.c b/gsk/gskpathpoint.c index 345feeca6e..07e3bf77ce 100644 --- a/gsk/gskpathpoint.c +++ b/gsk/gskpathpoint.c @@ -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) { diff --git a/gsk/gskpathpointprivate.h b/gsk/gskpathpointprivate.h index 3fba916cd7..f065f043e0 100644 --- a/gsk/gskpathpointprivate.h +++ b/gsk/gskpathpointprivate.h @@ -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