From c0d9c13d0403673a7fe994664a4f616c71301474 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Thu, 14 Apr 2005 14:02:03 +0000 Subject: [PATCH] Make gradient change color in addition to just changing alpha in order to highlight distinction between interpolating in premultiplied vs. non-premultiplied space. --- ChangeLog | 8 ++++++++ test/gradient-alpha-ref.png | Bin 146 -> 153 bytes test/gradient-alpha.c | 8 ++++---- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2d27c4dfa..fc599a1aa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2005-04-14 Carl Worth + + * 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 * test/Makefile.am: Improve instructions for when to add a test to diff --git a/test/gradient-alpha-ref.png b/test/gradient-alpha-ref.png index fd69649613ac879d6bd9a119bcb41573e92f603e..e75f91105335e2e8fdf4fd4c2e8c96ac71e348e8 100644 GIT binary patch delta 97 zcmV-n0G|Jn0hs}iKUx$!7DzFt3IG5AJ4r-AR2Y?GtY@g-&p-rV`OLuklPHB>7P5=M^G)Y83R2Y?GG)|lGpMeO#^8f$;XGAGvU|@Jo woI*xMYMc0vXgB_+wj2KwX(A)jPohi&06I4lXE&b2&;S4c07*qoM6N<$f*mj-mjD0& diff --git a/test/gradient-alpha.c b/test/gradient-alpha.c index 4d97e3ad1..869d23d96 100644 --- a/test/gradient-alpha.c +++ b/test/gradient-alpha.c @@ -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);