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:
10 * The above copyright notice and this permission notice shall be
11 * included in all copies or substantial portions of the Software.
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
23 #include "cairo-test.h"
27 static cairo_test_status_t
28 draw (cairo_t *cr, int width, int height)
32 cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
33 cairo_set_source_rgba (cr, 0.1, 0.2, 0.3, 1.0);
35 cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
37 cairo_translate (cr, width/2, height/2);
38 cairo_scale (cr, .85, .85);
40 for (i = 0; i < sizeof (tiger_commands)/sizeof(tiger_commands[0]);i++) {
41 const struct command *cmd = &tiger_commands[i];
44 cairo_move_to (cr, cmd->x0, cmd->y0);
47 cairo_line_to (cr, cmd->x0, cmd->y0);
56 cairo_set_source_rgba (cr,
57 cmd->x0, cmd->y0, cmd->x1, cmd->y1);
63 return CAIRO_TEST_SUCCESS;
66 static cairo_test_status_t
67 a1_draw (cairo_t *cr, int width, int height)
69 cairo_set_antialias (cr, CAIRO_ANTIALIAS_NONE);
70 return draw (cr, width, height);
74 "Check the fidelity of the rasterisation.",
75 "raster", /* keywords */
76 NULL, /* requirements */
81 "Check the fidelity of the rasterisation.",
82 "fill", /* keywords */
83 "target=raster", /* requirements */