summaryrefslogtreecommitdiff
path: root/test/filter-nearest-offset.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2008-09-30 10:04:12 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2008-09-30 11:11:51 +0100
commit7d5e6a18d5e72366e19cb806cbdad5ed180b53da (patch)
tree2dc6ed0eb3ed052da164dd32d9f57ae0d24019a2 /test/filter-nearest-offset.c
parent35be08715595aa0bda48ce0b3cb11711eee55c64 (diff)
downloadcairo-7d5e6a18d5e72366e19cb806cbdad5ed180b53da.tar.gz
[test/filter-nearest-offset] Paint a grey background
Avoid requiring (an absent!) rgb24 ref image by using an opaque grey background. Confirm the reference image is identical to the old one (modulo the background change) using GIMP.
Diffstat (limited to 'test/filter-nearest-offset.c')
-rw-r--r--test/filter-nearest-offset.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/filter-nearest-offset.c b/test/filter-nearest-offset.c
index a4cb5139d..065454856 100644
--- a/test/filter-nearest-offset.c
+++ b/test/filter-nearest-offset.c
@@ -57,6 +57,12 @@ draw (cairo_t *cr, int width, int height)
};
int i, j;
+ /* fill with off-white to avoid a separate rgb24 ref image */
+ cairo_save (cr);
+ cairo_set_source_rgb (cr, .7, .7, .7);
+ cairo_paint (cr);
+ cairo_restore (cr);
+
/* Draw reference lines where the jump should be. */
cairo_move_to (cr, PAD + STEPS / 2 * (STAMP_WIDTH + PAD), 0);
cairo_rel_line_to (cr, 0, IMAGE_HEIGHT);