[gtk/wip/baedert/radial-gradient] gsk: Add docs for radial gradient nodes



commit 6e14b2662225a42aae5d83b7ca519a742efcfa5f
Author: Timm Bäder <mail baedert org>
Date:   Fri Sep 18 18:41:01 2020 +0200

    gsk: Add docs for radial gradient nodes

 docs/reference/gsk/gsk4-sections.txt | 11 +++++++++++
 gsk/gskrendernodeimpl.c              | 34 ++++++++++++++++++++++++++++++++++
 2 files changed, 45 insertions(+)
---
diff --git a/docs/reference/gsk/gsk4-sections.txt b/docs/reference/gsk/gsk4-sections.txt
index efc24e070d..3d0e9f0ccf 100644
--- a/docs/reference/gsk/gsk4-sections.txt
+++ b/docs/reference/gsk/gsk4-sections.txt
@@ -37,9 +37,11 @@ GskCrossFadeNode
 GskDebugNode
 GskInsetShadowNode
 GskLinearGradientNode
+GskRadialGradientNode
 GskOpacityNode
 GskOutsetShadowNode
 GskRepeatingLinearGradientNode
+GskRepeatingRadialGradientNode
 GskRepeatNode
 GskRoundedClipNode
 GskShadowNode
@@ -71,6 +73,15 @@ gsk_linear_gradient_node_peek_end
 gsk_linear_gradient_node_get_n_color_stops
 gsk_linear_gradient_node_peek_color_stops
 gsk_repeating_linear_gradient_node_new
+gsk_radial_gradient_node_new
+gsk_radial_gradient_node_get_n_color_stops
+gsk_radial_gradient_node_peek_color_stops
+gsk_radial_gradient_node_get_start
+gsk_radial_gradient_node_get_end
+gsk_radial_gradient_node_get_hradius
+gsk_radial_gradient_node_get_vradius
+gsk_radial_gradient_node_peek_center
+gsk_repeating_radial_gradient_node_new
 gsk_border_node_new
 gsk_border_node_peek_outline
 gsk_border_node_peek_widths
diff --git a/gsk/gskrendernodeimpl.c b/gsk/gskrendernodeimpl.c
index 45734b5599..bc16f53980 100644
--- a/gsk/gskrendernodeimpl.c
+++ b/gsk/gskrendernodeimpl.c
@@ -490,6 +490,23 @@ gsk_radial_gradient_node_diff (GskRenderNode  *node1,
   gsk_render_node_diff_impossible (node1, node2, region);
 }
 
+/**
+ * gsk_radial_gradient_node_new:
+ * @bounds: the bounds of the node
+ * @center: the center of the gradient
+ * @hradius: the horizontal radius
+ * @vradius: the vertical radius
+ * @start: a percentage >= 0 that defines the start of the gradient around @center
+ * @end: a percentage >= 0 that defines the end of the gradient around @center
+ * @color_stops: (array length=n_color_stops): a pointer to an array of #GskColorStop defining the gradient
+ * @n_color_stops: the number of elements in @color_stops
+ *
+ * Creates a #GskRenderNode that draws a radial gradient. The radial gradient
+ * starts around @center. The size of the gradient is dictated by @hradius
+ * in horizontal orientation and by @vradius in vertial orientation.
+ *
+ * Returns: (transfer full) (type GskRadialGradientNode): A new #GskRenderNode
+ */
 GskRenderNode *
 gsk_radial_gradient_node_new (const graphene_rect_t  *bounds,
                               const graphene_point_t *center,
@@ -536,6 +553,23 @@ gsk_radial_gradient_node_new (const graphene_rect_t  *bounds,
   return node;
 }
 
+/**
+ * gsk_repeating_radial_gradient_node_new:
+ * @bounds: the bounds of the node
+ * @center: the center of the gradient
+ * @hradius: the horizontal radius
+ * @vradius: the vertical radius
+ * @start: a percentage >= 0 that defines the start of the gradient around @center
+ * @end: a percentage >= 0 that defines the end of the gradient around @center
+ * @color_stops: (array length=n_color_stops): a pointer to an array of #GskColorStop defining the gradient
+ * @n_color_stops: the number of elements in @color_stops
+ *
+ * Creates a #GskRenderNode that draws a repeating radial gradient. The radial gradient
+ * starts around @center. The size of the gradient is dictated by @hradius
+ * in horizontal orientation and by @vradius in vertial orientation.
+ *
+ * Returns: (transfer full) (type GskRepeatingRadialGradientNode): A new #GskRenderNode
+ */
 GskRenderNode *
 gsk_repeating_radial_gradient_node_new (const graphene_rect_t  *bounds,
                                         const graphene_point_t *center,


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