Make gradient change color in addition to just changing alpha in order to highlight distinction between interpolating in premultiplied vs. non-premultiplied space.

This commit is contained in:
Carl Worth 2005-04-14 14:02:03 +00:00
parent 65209fc39c
commit c0d9c13d04
3 changed files with 12 additions and 4 deletions

View file

@ -1,3 +1,11 @@
2005-04-14 Carl Worth <cworth@cworth.org>
* test/gradient-alpha-ref.png:
* test/gradient-alpha.c: (draw): Make gradient change color in
addition to just changing alpha in order to highlight distinction
between interpolating in premultiplied vs. non-premultiplied
space.
2005-04-14 Carl Worth <cworth@cworth.org>
* test/Makefile.am: Improve instructions for when to add a test to

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 B

After

Width:  |  Height:  |  Size: 153 B

View file

@ -36,14 +36,14 @@ draw (cairo_t *cr, int width, int height)
{
cairo_pattern_t *gradient;
gradient = cairo_pattern_create_linear (0, 0,
gradient = cairo_pattern_create_linear (0, -height,
0, height);
cairo_pattern_add_color_stop (gradient, 0.0,
.2, .4, .6,
1.0, 0.0, 0.0,
1.0);
cairo_pattern_add_color_stop (gradient, 1.0,
.2, .4, .6,
0.0);
0.0, 0.0, 1.0,
0.5);
cairo_set_pattern (cr, gradient);