mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-30 15:31:34 +00:00
cssimagelinear: Make gradient offsets stay in [0, 1]
Fixes linear-gradient reftest
This commit is contained in:
parent
fee8f6b9be
commit
b21882bcea
@ -211,7 +211,10 @@ gtk_css_image_linear_snapshot (GtkCssImage *image,
|
||||
continue;
|
||||
}
|
||||
else
|
||||
pos = _gtk_css_number_value_get (stop->offset, length) / length;
|
||||
{
|
||||
pos = _gtk_css_number_value_get (stop->offset, length) / length;
|
||||
pos = CLAMP (pos, 0.0, 1.0);
|
||||
}
|
||||
|
||||
pos = MAX (pos, offset);
|
||||
step = (pos - offset) / (i - last);
|
||||
|
Loading…
Reference in New Issue
Block a user