[gtk/wip/baedert/radial-gradient: 8/13] radial gradients: Allow 0 start/end values
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/baedert/radial-gradient: 8/13] radial gradients: Allow 0 start/end values
- Date: Fri, 18 Sep 2020 13:45:17 +0000 (UTC)
commit dbfc172f6ad21880bfe0aff3a140fe6fab48a50f
Author: Timm Bäder <mail baedert org>
Date: Wed Sep 16 05:02:07 2020 +0200
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[] = {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]