From 2fcb20cc4a83831e0ebbae466849233acbd023ab Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 10 Sep 2023 19:05:27 +0200 Subject: [PATCH] contour: Add private api to circle contours Add api to retrieve the parameters of a circle contour. This will be used in the following commits. --- gsk/gskcontour.c | 13 +++++++++++++ gsk/gskcontourprivate.h | 4 ++++ 2 files changed, 17 insertions(+) diff --git a/gsk/gskcontour.c b/gsk/gskcontour.c index 0e3a741473..9b9ceeff52 100644 --- a/gsk/gskcontour.c +++ b/gsk/gskcontour.c @@ -1749,6 +1749,19 @@ gsk_circle_contour_new (const graphene_point_t *center, return (GskContour *) self; } +void +gsk_circle_contour_get_params (const GskContour *contour, + graphene_point_t *center, + float *radius, + gboolean *ccw) +{ + const GskCircleContour *self = (const GskCircleContour *) contour; + + *center = self->center; + *radius = self->radius; + *ccw = self->ccw; +} + /* }}} */ /* {{{ Rectangle */ diff --git a/gsk/gskcontourprivate.h b/gsk/gskcontourprivate.h index 15bfd80ba3..4c0307c4b5 100644 --- a/gsk/gskcontourprivate.h +++ b/gsk/gskcontourprivate.h @@ -36,6 +36,10 @@ GskContour * gsk_standard_contour_new (GskPathFlags GskContour * gsk_circle_contour_new (const graphene_point_t *center, float radius); +void gsk_circle_contour_get_params (const GskContour *contour, + graphene_point_t *center, + float *radius, + gboolean *ccw); GskContour * gsk_rect_contour_new (const graphene_rect_t *rect); GskContour * gsk_rounded_rect_contour_new (const GskRoundedRect *rounded_rect);