1
/*
2
 * Permission is hereby granted, free of charge, to any person
3
 * obtaining a copy of this software and associated documentation
4
 * files (the "Software"), to deal in the Software without
5
 * restriction, including without limitation the rights to use, copy,
6
 * modify, merge, publish, distribute, sublicense, and/or sell copies
7
 * of the Software, and to permit persons to whom the Software is
8
 * furnished to do so, subject to the following conditions:
9
 *
10
 * The above copyright notice and this permission notice shall be
11
 * included in all copies or substantial portions of the Software.
12
 *
13
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
14
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
15
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
16
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
17
 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
18
 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
 * SOFTWARE.
21
 */
22

            
23
#include "cairo-test.h"
24

            
25
static cairo_test_status_t
26
3
draw (cairo_t *cr, int width, int height)
27
{
28
    static const struct point {
29
	double x;
30
	double y;
31
    } xy[] = {
32
	{ 627.016212, 221.749777 },
33
	{ 756.120787, 221.749777 },
34
	{ 756.120787, 557.602766 },
35
	{ 626.952721, 557.602766 },
36
	{ 626.548456, 493.315729 },
37
    };
38
    unsigned int i;
39

            
40
3
    cairo_set_source_rgb (cr, 0, 0, 0);
41
3
    cairo_paint (cr);
42

            
43
18
    for (i = 0; i < ARRAY_LENGTH (xy); i++)
44
15
	cairo_line_to (cr, xy[i].x, xy[i].y);
45

            
46
3
    cairo_set_source_rgb (cr, 1, 0, 0);
47
3
    cairo_fill_preserve (cr);
48

            
49
3
    cairo_set_antialias (cr, CAIRO_ANTIALIAS_NONE);
50
3
    cairo_set_source_rgb (cr, 0, 1, 0);
51
3
    cairo_fill (cr);
52

            
53
3
    return CAIRO_TEST_SUCCESS;
54
}
55

            
56
1
CAIRO_TEST (a1_bug,
57
	    "Check the fidelity of the rasterisation.",
58
	    "a1, raster", /* keywords */
59
	    "target=raster", /* requirements */
60
	    1000, 800,
61
	    NULL, draw)