diff options
author | Timm Bäder <mail@baedert.org> | 2020-09-18 18:41:01 +0200 |
---|---|---|
committer | Timm Bäder <mail@baedert.org> | 2020-09-18 18:41:01 +0200 |
commit | 6e14b2662225a42aae5d83b7ca519a742efcfa5f (patch) | |
tree | eb4a1ff906fdb87c0fbe934db79c61a225743816 | |
parent | 5d5fbc69a4931e9760f75f7e6f43a55125eb7188 (diff) | |
download | gtk+-6e14b2662225a42aae5d83b7ca519a742efcfa5f.tar.gz |
gsk: Add docs for radial gradient nodes
-rw-r--r-- | docs/reference/gsk/gsk4-sections.txt | 11 | ||||
-rw-r--r-- | gsk/gskrendernodeimpl.c | 34 |
2 files changed, 45 insertions, 0 deletions
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, |