roundedrect: Add gsk_rounded_rect_to_string

Keep it private for now, but it's very useful when debugging.
This commit is contained in:
Timm Bäder 2019-02-28 09:44:08 +01:00
parent 7931ab5f33
commit dc282991c6
2 changed files with 23 additions and 0 deletions

View File

@ -535,3 +535,24 @@ gsk_rounded_rect_equal (gconstpointer rect1,
&& graphene_size_equal (&self1->corner[2], &self2->corner[2])
&& graphene_size_equal (&self1->corner[3], &self2->corner[3]);
}
char *
gsk_rounded_rect_to_string (const GskRoundedRect *self)
{
return g_strdup_printf ("GskRoundedRect %p: Bounds: (%f, %f, %f, %f)"
" Corners: (%f, %f) (%f, %f) (%f, %f) (%f, %f)",
self,
self->bounds.origin.x,
self->bounds.origin.y,
self->bounds.size.width,
self->bounds.size.height,
self->corner[0].width,
self->corner[0].height,
self->corner[1].width,
self->corner[1].height,
self->corner[2].width,
self->corner[2].height,
self->corner[3].width,
self->corner[3].height);
}

View File

@ -16,6 +16,8 @@ void gsk_rounded_rect_to_float (const GskRounde
gboolean gsk_rounded_rect_equal (gconstpointer rect1,
gconstpointer rect2);
char * gsk_rounded_rect_to_string (const GskRoundedRect *self);
G_END_DECLS