forked from AuroraMiddleware/gtk
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