From dbfc172f6ad21880bfe0aff3a140fe6fab48a50f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 16 Sep 2020 05:02:07 +0200 Subject: [PATCH] radial gradients: Allow 0 start/end values --- gsk/gskrendernodeimpl.c | 8 ++++---- gsk/gskrendernodeparser.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gsk/gskrendernodeimpl.c b/gsk/gskrendernodeimpl.c index fb392d5966..12e339749d 100644 --- a/gsk/gskrendernodeimpl.c +++ b/gsk/gskrendernodeimpl.c @@ -509,8 +509,8 @@ gsk_radial_gradient_node_new (const graphene_rect_t *bounds, g_return_val_if_fail (center != NULL, NULL); g_return_val_if_fail (hradius > 0., NULL); g_return_val_if_fail (vradius > 0., NULL); - g_return_val_if_fail (start > 0., NULL); - g_return_val_if_fail (end > 0., NULL); + g_return_val_if_fail (start >= 0., NULL); + g_return_val_if_fail (end >= 0., NULL); g_return_val_if_fail (color_stops != NULL, NULL); g_return_val_if_fail (n_color_stops >= 2, NULL); g_return_val_if_fail (color_stops[0].offset >= 0, NULL); @@ -554,8 +554,8 @@ gsk_repeating_radial_gradient_node_new (const graphene_rect_t *bounds, g_return_val_if_fail (center != NULL, NULL); g_return_val_if_fail (hradius > 0., NULL); g_return_val_if_fail (vradius > 0., NULL); - g_return_val_if_fail (start > 0., NULL); - g_return_val_if_fail (end > 0., NULL); + g_return_val_if_fail (start >= 0., NULL); + g_return_val_if_fail (end >= 0., NULL); g_return_val_if_fail (color_stops != NULL, NULL); g_return_val_if_fail (n_color_stops >= 2, NULL); g_return_val_if_fail (color_stops[0].offset >= 0, NULL); diff --git a/gsk/gskrendernodeparser.c b/gsk/gskrendernodeparser.c index 5520167950..870ce8818b 100644 --- a/gsk/gskrendernodeparser.c +++ b/gsk/gskrendernodeparser.c @@ -1020,7 +1020,7 @@ parse_radial_gradient_node_internal (GtkCssParser *parser, graphene_point_t center = GRAPHENE_POINT_INIT (25, 25); double hradius = 25.0; double vradius = 25.0; - double start = 0.5; + double start = 0; double end = 1.0; GArray *stops = NULL; const Declaration declarations[] = {