mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-08 13:48:02 +02:00
Initialize op->stops[0].scale = 0.
This scale value is used only when computing gradient values before the defined range, in which case stop 0 is used for both ends of the interpolation, making the value of 'scale' not actually matter, except that valgrind notices we're using an undefined value.
This commit is contained in:
parent
e5b31bca7c
commit
200bcda188
2 changed files with 18 additions and 0 deletions
11
ChangeLog
11
ChangeLog
|
|
@ -1,3 +1,14 @@
|
||||||
|
2005-05-16 Keith Packard <keithp@keithp.com>
|
||||||
|
|
||||||
|
* src/cairo-pattern.c: (_cairo_pattern_shader_init):
|
||||||
|
Initialize op->stops[0].scale = 0.
|
||||||
|
|
||||||
|
This scale value is used only when computing gradient values
|
||||||
|
before the defined range, in which case stop 0 is used for both
|
||||||
|
ends of the interpolation, making the value of 'scale' not
|
||||||
|
actually matter, except that valgrind notices we're using
|
||||||
|
an undefined value.
|
||||||
|
|
||||||
2005-05-16 Carl Worth <cworth@cworth.org>
|
2005-05-16 Carl Worth <cworth@cworth.org>
|
||||||
|
|
||||||
* test/.cvsignore:
|
* test/.cvsignore:
|
||||||
|
|
|
||||||
|
|
@ -512,6 +512,13 @@ _cairo_pattern_shader_init (cairo_gradient_pattern_t *pattern,
|
||||||
qsort (op->stops, pattern->n_stops, sizeof (cairo_shader_color_stop_t),
|
qsort (op->stops, pattern->n_stops, sizeof (cairo_shader_color_stop_t),
|
||||||
_cairo_shader_color_stop_compare);
|
_cairo_shader_color_stop_compare);
|
||||||
|
|
||||||
|
/* this scale value is used only when computing gradient values
|
||||||
|
* before the defined range, in which case stop 0 is used for both
|
||||||
|
* ends of the interpolation, making the value of 'scale' not
|
||||||
|
* actually matter, except that valgrind notices we're using
|
||||||
|
* an undefined value.
|
||||||
|
*/
|
||||||
|
op->stops[0].scale = 0;
|
||||||
for (i = 0; i < pattern->n_stops - 1; i++)
|
for (i = 0; i < pattern->n_stops - 1; i++)
|
||||||
{
|
{
|
||||||
op->stops[i + 1].scale = op->stops[i + 1].offset - op->stops[i].offset;
|
op->stops[i + 1].scale = op->stops[i + 1].offset - op->stops[i].offset;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue