path: Cosmetics

Reorganize this source file into sections.
This commit is contained in:
Matthias Clasen 2023-08-28 21:13:58 -04:00
parent 11b219bc61
commit 05547d98d6

View File

@ -66,6 +66,8 @@ struct _GskPath
G_DEFINE_BOXED_TYPE (GskPath, gsk_path, gsk_path_ref, gsk_path_unref) G_DEFINE_BOXED_TYPE (GskPath, gsk_path, gsk_path_ref, gsk_path_unref)
/* {{{ Private API */
GskPath * GskPath *
gsk_path_new_from_contours (const GSList *contours) gsk_path_new_from_contours (const GSList *contours)
{ {
@ -110,6 +112,31 @@ gsk_path_new_from_contours (const GSList *contours)
return path; return path;
} }
const GskContour *
gsk_path_get_contour (const GskPath *self,
gsize i)
{
if (i < self->n_contours)
return self->contours[i];
else
return NULL;
}
GskPathFlags
gsk_path_get_flags (const GskPath *self)
{
return self->flags;
}
gsize
gsk_path_get_n_contours (const GskPath *self)
{
return self->n_contours;
}
/* }}} */
/* {{{ Public API */
/** /**
* gsk_path_ref: * gsk_path_ref:
* @self: a `GskPath` * @self: a `GskPath`
@ -153,22 +180,6 @@ gsk_path_unref (GskPath *self)
g_free (self); g_free (self);
} }
const GskContour *
gsk_path_get_contour (const GskPath *self,
gsize i)
{
if (i < self->n_contours)
return self->contours[i];
else
return NULL;
}
GskPathFlags
gsk_path_get_flags (const GskPath *self)
{
return self->flags;
}
/** /**
* gsk_path_print: * gsk_path_print:
* @self: a `GskPath` * @self: a `GskPath`
@ -295,20 +306,6 @@ gsk_path_to_cairo (GskPath *self,
cr); cr);
} }
/*< private >
* gsk_path_get_n_contours:
* @path: a `GskPath`
*
* Gets the number of contours @path is composed out of.
*
* Returns: the number of contours in @path
*/
gsize
gsk_path_get_n_contours (const GskPath *self)
{
return self->n_contours;
}
/** /**
* gsk_path_is_empty: * gsk_path_is_empty:
* @self: a `GskPath` * @self: a `GskPath`
@ -613,6 +610,9 @@ gsk_path_get_closest_point (GskPath *self,
return found; return found;
} }
/* }}} */
/* {{{ Foreach and decomposition */
/** /**
* gsk_path_foreach: * gsk_path_foreach:
* @self: a `GskPath` * @self: a `GskPath`
@ -817,7 +817,8 @@ gsk_path_foreach_with_tolerance (GskPath *self,
return TRUE; return TRUE;
} }
/* path parser and utilities */ /* }}} */
/* {{{ Parser and utilities */
static void static void
skip_whitespace (const char **p) skip_whitespace (const char **p)
@ -1612,3 +1613,7 @@ error:
return NULL; return NULL;
} }
/* }}} */
/* vim:set foldmethod=marker expandtab: */