Add gsk_path_point_print
Another private debug API.
This commit is contained in:
@@ -54,15 +54,23 @@ G_DEFINE_BOXED_TYPE (GskPathPoint, gsk_path_point,
|
||||
gsk_path_point_free)
|
||||
|
||||
|
||||
const char *
|
||||
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;
|
||||
|
||||
return g_strdup_printf ("{ .contour = %lu, .idx = %lu, .t = %.9f }",
|
||||
p->contour, p->idx, p->t);
|
||||
}
|
||||
|
||||
void
|
||||
gsk_path_point_print (GskPathPoint *point)
|
||||
{
|
||||
char *s;
|
||||
|
||||
s = gsk_path_point_to_string (point);
|
||||
g_print ("%s\n", s);
|
||||
g_free (s);
|
||||
}
|
||||
|
||||
GskPathPoint *
|
||||
|
||||
@@ -14,7 +14,8 @@ struct _GskRealPathPoint
|
||||
|
||||
G_STATIC_ASSERT (sizeof (GskRealPathPoint) <= sizeof (GskPathPoint));
|
||||
|
||||
const char * gsk_path_point_to_string (GskPathPoint *point);
|
||||
char * gsk_path_point_to_string (GskPathPoint *point);
|
||||
void gsk_path_point_print (GskPathPoint *point);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
||||
Reference in New Issue
Block a user