summaryrefslogtreecommitdiff
path: root/test/fill-alpha-pattern.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2008-09-09 09:06:10 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2008-09-09 09:07:34 +0100
commit378b11aaf39496919fd10108c00946cffe1fafc4 (patch)
tree2d4ff9372040dc117b5bfdeeab6124f02df8d2f1 /test/fill-alpha-pattern.c
parentc20179b65ff887b4c5dc7f984ede1cb986de859d (diff)
downloadcairo-378b11aaf39496919fd10108c00946cffe1fafc4.tar.gz
[test] fill-alpha
Update alpha value to non-divisable-by-256 number to expose a bug in pixman where it appears to be mixing in empty registers.
Diffstat (limited to 'test/fill-alpha-pattern.c')
-rw-r--r--test/fill-alpha-pattern.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/test/fill-alpha-pattern.c b/test/fill-alpha-pattern.c
index 7b0714afd..79722ca77 100644
--- a/test/fill-alpha-pattern.c
+++ b/test/fill-alpha-pattern.c
@@ -40,6 +40,7 @@ static const cairo_test_t test = {
static cairo_test_status_t
draw (cairo_t *cr, int width, int height)
{
+ const double alpha = 1./3;
cairo_pattern_t *pattern;
int n;
@@ -53,13 +54,13 @@ draw (cairo_t *cr, int width, int height)
/* square */
cairo_rectangle (cr, PAD, PAD, SIZE, SIZE);
- cairo_set_source_rgba (cr, 1, 0, 0, .5);
+ cairo_set_source_rgba (cr, 1, 0, 0, alpha);
cairo_fill (cr);
/* circle */
cairo_translate (cr, SIZE + 2 * PAD, 0);
cairo_arc (cr, PAD + SIZE / 2., PAD + SIZE / 2., SIZE / 2., 0, 2 * M_PI);
- cairo_set_source_rgba (cr, 0, 1, 0, .5);
+ cairo_set_source_rgba (cr, 0, 1, 0, alpha);
cairo_fill (cr);
/* triangle */
@@ -67,7 +68,7 @@ draw (cairo_t *cr, int width, int height)
cairo_move_to (cr, PAD + SIZE / 2, PAD);
cairo_line_to (cr, PAD + SIZE, PAD + SIZE);
cairo_line_to (cr, PAD, PAD + SIZE);
- cairo_set_source_rgba (cr, 0, 0, 1, .5);
+ cairo_set_source_rgba (cr, 0, 0, 1, alpha);
cairo_fill (cr);
/* star */
@@ -81,7 +82,7 @@ draw (cairo_t *cr, int width, int height)
SIZE/4 * cos ((2*n+1)*2*M_PI / 10),
SIZE/4 * sin ((2*n+1)*2*M_PI / 10));
}
- cairo_set_source_rgba (cr, 0, 0, 0, .5);
+ cairo_set_source_rgba (cr, 0, 0, 0, alpha);
cairo_fill (cr);
return CAIRO_TEST_SUCCESS;