evas filter - curve func was off-by-1 ... fix!

@fix
This commit is contained in:
Carsten Haitzler 2024-01-09 12:18:44 +00:00
parent d2073a4a56
commit 5823aa2569
1 changed files with 10 additions and 1 deletions

View File

@ -92,9 +92,18 @@ _interpolate_linear(DATA8 *output, int *points)
{
if (points[j] != -1)
{
int val1, val2, vald, pos, len;
output[j] = (DATA8) points[j];
val1 = points[last_idx];
val2 = points[j];
vald = val2 - val1;
len = j - last_idx;
for (k = last_idx + 1; k < j; k++)
output[k] = (DATA8) (points[j] + ((k - last_idx) * (points[j] - points[last_idx]) / (j - last_idx)));
{
pos = k - last_idx;
output[k] = (DATA8) (val1 + ((pos * vald) / len));
}
last_idx = j;
}
}