[gtk/wip/baedert/radial-gradient] cssimageradial: Avoid creating color stops with an offset > 1
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/baedert/radial-gradient] cssimageradial: Avoid creating color stops with an offset > 1
- Date: Sat, 19 Sep 2020 06:55:41 +0000 (UTC)
commit 79dc25e0b11466ad7a8058e780f8c1e729be2b72
Author: Timm Bäder <mail baedert org>
Date: Sat Sep 19 08:55:18 2020 +0200
cssimageradial: Avoid creating color stops with an offset > 1
gtk/gtkcssimageradial.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gtk/gtkcssimageradial.c b/gtk/gtkcssimageradial.c
index 6d7980dc1a..4b36a1e165 100644
--- a/gtk/gtkcssimageradial.c
+++ b/gtk/gtkcssimageradial.c
@@ -176,7 +176,7 @@ gtk_css_image_radial_snapshot (GtkCssImage *image,
continue;
}
else
- pos = _gtk_css_number_value_get (stop->offset, hradius) / hradius;
+ pos = MIN (1.0, _gtk_css_number_value_get (stop->offset, hradius) / hradius);
pos = MAX (pos, 0);
step = (pos - offset) / (i - last);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]