[gtk/ebassi/gidocgen: 193/200] gskroundedrect: Convert docs




commit b8fb8abeea17fd14ea4ac270a6decedbf673d940
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Feb 25 07:00:16 2021 -0500

    gskroundedrect: Convert docs

 gsk/gskroundedrect.c | 87 +++++++++++++++++++++++++++++-----------------------
 gsk/gskroundedrect.h | 14 ---------
 2 files changed, 49 insertions(+), 52 deletions(-)
---
diff --git a/gsk/gskroundedrect.c b/gsk/gskroundedrect.c
index 2dd842d0ca..f99430962a 100644
--- a/gsk/gskroundedrect.c
+++ b/gsk/gskroundedrect.c
@@ -17,17 +17,23 @@
  */
 
 /**
- * SECTION:GskRoundedRect
- * @Title: GskRoundedRect
- * @Short_description: A rounded rectangle
+ * GskRoundedRect:
+ * @bounds: the bounds of the rectangle
+ * @corner: the size of the 4 rounded corners
  *
- * #GskRoundedRect defines a rectangle with rounded corners, as is commonly
- * used in drawing.
+ * A rectangular region with rounded corners.
  *
- * Operations on a #GskRoundedRect will normalize the rectangle, to
- * ensure that the bounds are normalized and that the corner sizes don't exceed
- * the size of the rectangle. The algorithm used for normalizing corner sizes
- * is described in [the CSS specification](https://drafts.csswg.org/css-backgrounds-3/#border-radius).
+ * Application code should normalize rectangles using
+ * [method@Gsk.RoundedRect.normalize]; this function will ensure that
+ * the bounds of the rectangle are normalized and ensure that the corner
+ * values are positive and the corners do not overlap.
+ *
+ * All functions taking a `GskRoundedRect` as an argument will internally
+ * operate on a normalized copy; all functions returning a `GskRoundedRect`
+ * will always return a normalized one.
+ *
+ * The algorithm used for normalizing corner sizes is described in
+ * [the CSS specification](https://drafts.csswg.org/css-backgrounds-3/#border-radius).
  */
 
 #include "config.h"
@@ -77,16 +83,16 @@ gsk_rounded_rect_normalize_in_place (GskRoundedRect *self)
 
 /**
  * gsk_rounded_rect_init:
- * @self: The #GskRoundedRect to initialize
- * @bounds: a #graphene_rect_t describing the bounds
+ * @self: The `GskRoundedRect` to initialize
+ * @bounds: a `graphene_rect_t` describing the bounds
  * @top_left: the rounding radius of the top left corner
  * @top_right: the rounding radius of the top right corner
  * @bottom_right: the rounding radius of the bottom right corner
  * @bottom_left: the rounding radius of the bottom left corner
  *
- * Initializes the given #GskRoundedRect with the given values.
+ * Initializes the given `GskRoundedRect` with the given values.
  *
- * This function will implicitly normalize the #GskRoundedRect
+ * This function will implicitly normalize the `GskRoundedRect`
  * before returning.
  *
  * Returns: (transfer none): the initialized rectangle
@@ -112,13 +118,13 @@ gsk_rounded_rect_init (GskRoundedRect        *self,
 
 /**
  * gsk_rounded_rect_init_copy:
- * @self: a #GskRoundedRect
- * @src: a #GskRoundedRect
+ * @self: a `GskRoundedRect`
+ * @src: a `GskRoundedRect`
  *
  * Initializes @self using the given @src rectangle.
  *
- * This function will not normalize the #GskRoundedRect, so
- * make sure the source is normalized.
+ * This function will not normalize the `GskRoundedRect`,
+ * so make sure the source is normalized.
  *
  * Returns: (transfer none): the initialized rectangle
  */
@@ -133,12 +139,12 @@ gsk_rounded_rect_init_copy (GskRoundedRect       *self,
 
 /**
  * gsk_rounded_rect_init_from_rect:
- * @self: a #GskRoundedRect
- * @bounds: a #graphene_rect_t
+ * @self: a `GskRoundedRect`
+ * @bounds: a `graphene_rect_t`
  * @radius: the border radius
  *
- * Initializes @self to the given @bounds and sets the radius of all
- * four corners to @radius.
+ * Initializes @self to the given @bounds and sets the radius
+ * of all four corners to @radius.
  *
  * Returns: (transfer none): the initialized rectangle
  **/
@@ -154,12 +160,13 @@ gsk_rounded_rect_init_from_rect (GskRoundedRect        *self,
 
 /**
  * gsk_rounded_rect_normalize:
- * @self: a #GskRoundedRect
+ * @self: a `GskRoundedRect`
  *
  * Normalizes the passed rectangle.
  *
- * this function will ensure that the bounds of the rectangle are normalized
- * and ensure that the corner values are positive and the corners do not overlap.
+ * This function will ensure that the bounds of the rectangle
+ * are normalized and ensure that the corner values are positive
+ * and the corners do not overlap.
  *
  * Returns: (transfer none): the normalized rectangle
  */
@@ -173,7 +180,7 @@ gsk_rounded_rect_normalize (GskRoundedRect *self)
 
 /**
  * gsk_rounded_rect_offset:
- * @self: a #GskRoundedRect
+ * @self: a `GskRoundedRect`
  * @dx: the horizontal offset
  * @dy: the vertical offset
  *
@@ -221,21 +228,22 @@ border_radius_shrink (graphene_size_t       *corner,
 
 /**
  * gsk_rounded_rect_shrink:
- * @self: The #GskRoundedRect to shrink or grow
+ * @self: The `GskRoundedRect` to shrink or grow
  * @top: How far to move the top side downwards
  * @right: How far to move the right side to the left
  * @bottom: How far to move the bottom side upwards
  * @left: How far to move the left side to the right
  *
  * Shrinks (or grows) the given rectangle by moving the 4 sides
- * according to the offsets given. The corner radii will be changed
- * in a way that tries to keep the center of the corner circle intact.
- * This emulates CSS behavior.
+ * according to the offsets given.
+ *
+ * The corner radii will be changed in a way that tries to keep
+ * the center of the corner circle intact. This emulates CSS behavior.
  *
  * This function also works for growing rectangles if you pass
  * negative values for the @top, @right, @bottom or @left.
  *
- * Returns: (transfer none): the resized #GskRoundedRect
+ * Returns: (transfer none): the resized `GskRoundedRect`
  **/
 GskRoundedRect *
 gsk_rounded_rect_shrink (GskRoundedRect *self,
@@ -291,13 +299,13 @@ gsk_rounded_rect_is_circular (const GskRoundedRect *self)
 
 /**
  * gsk_rounded_rect_is_rectilinear:
- * @self: the #GskRoundedRect to check
+ * @self: the `GskRoundedRect` to check
  *
  * Checks if all corners of @self are right angles and the
  * rectangle covers all of its bounds.
  *
- * This information can be used to decide if gsk_clip_node_new()
- * or gsk_rounded_clip_node_new() should be called.
+ * This information can be used to decide if [ctorGsk.ClipNode.new]
+ * or [ctor Gsk RoundedClipNode new] should be called.
  *
  * Returns: %TRUE if the rectangle is rectilinear
  **/
@@ -385,11 +393,12 @@ gsk_rounded_rect_locate_point (const GskRoundedRect   *self,
 
 /**
  * gsk_rounded_rect_contains_point:
- * @self: a #GskRoundedRect
+ * @self: a `GskRoundedRect`
  * @point: the point to check
  *
- * Checks if the given @point is inside the rounded rectangle. This function
- * returns %FALSE if the point is in the rounded corner areas.
+ * Checks if the given @point is inside the rounded rectangle.
+ *
+ * This function returns %FALSE if the point is in the rounded corner areas.
  *
  * Returns: %TRUE if the @point is inside the rounded rectangle
  **/
@@ -402,10 +411,11 @@ gsk_rounded_rect_contains_point (const GskRoundedRect   *self,
 
 /**
  * gsk_rounded_rect_contains_rect:
- * @self: a #GskRoundedRect
+ * @self: a `GskRoundedRect`
  * @rect: the rectangle to check
  *
  * Checks if the given @rect is contained inside the rounded rectangle.
+ *
  * This function returns %FALSE if @rect extends into one of the rounded
  * corner areas.
  *
@@ -432,10 +442,11 @@ gsk_rounded_rect_contains_rect (const GskRoundedRect  *self,
 
 /**
  * gsk_rounded_rect_intersects_rect:
- * @self: a #GskRoundedRect
+ * @self: a `GskRoundedRect`
  * @rect: the rectangle to check
  *
  * Checks if part of the given @rect is contained inside the rounded rectangle.
+ *
  * This function returns %FALSE if @rect only extends into one of the rounded
  * corner areas but not into the rounded rectangle itself.
  *
diff --git a/gsk/gskroundedrect.h b/gsk/gskroundedrect.h
index 45231e60be..d02757fb78 100644
--- a/gsk/gskroundedrect.h
+++ b/gsk/gskroundedrect.h
@@ -45,20 +45,6 @@ G_BEGIN_DECLS
                                                                        GRAPHENE_SIZE_INIT(0, 0),\
                                                                     }}
 
-/**
- * GskRoundedRect:
- * @bounds: the bounds of the rectangle
- * @corner: the size of the 4 rounded corners
- *
- * A rectangular region with rounded corners.
- *
- * Application code should normalize rectangles using gsk_rounded_rect_normalize();
- * this function will ensure that the bounds of the rectangle are normalized
- * and ensure that the corner values are positive and the corners do not overlap.
- * All functions taking a #GskRoundedRect as an argument will internally operate on
- * a normalized copy; all functions returning a #GskRoundedRect will always return
- * a normalized one.
- */
 typedef struct _GskRoundedRect           GskRoundedRect;
 
 struct _GskRoundedRect


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]