Update long-lines test

This commit is contained in:
Adrian Johnson 2022-05-28 16:13:21 +09:30
parent 47a21c6e30
commit e7da8451f8
15 changed files with 6 additions and 3 deletions

View file

@ -29,6 +29,9 @@
#define LINE_WIDTH 1. #define LINE_WIDTH 1.
#define SIZE 10 #define SIZE 10
#define LINE_NBR 6 #define LINE_NBR 6
#define WIDTH (SIZE * (LINE_NBR + 1))
#define HEIGHT (SIZE * (LINE_NBR + 1))
struct { struct {
double length; double length;
@ -66,8 +69,8 @@ draw (cairo_t *cr, int width, int height)
} }
/* This should display a perfect vertically centered black line */ /* This should display a perfect vertically centered black line */
cairo_move_to (cr, 0.5, -1e100); cairo_move_to (cr, -1e100, HEIGHT/2);
cairo_line_to (cr, pos, 1e100); cairo_line_to (cr, 1e100, HEIGHT/2);
cairo_set_source_rgb (cr, 0.0, 0.0, 0.0); cairo_set_source_rgb (cr, 0.0, 0.0, 0.0);
cairo_stroke (cr); cairo_stroke (cr);
@ -80,6 +83,6 @@ CAIRO_TEST (long_lines,
"\nLong lines are not drawn due to the limitations of the internal 16.16 fixed-point coordinates", "\nLong lines are not drawn due to the limitations of the internal 16.16 fixed-point coordinates",
"stroke, stress", /* keywords */ "stroke, stress", /* keywords */
NULL, /* requirements */ NULL, /* requirements */
SIZE * (LINE_NBR + 1), SIZE * (LINE_NBR + 1), WIDTH, HEIGHT,
NULL, draw) NULL, draw)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 201 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 201 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 201 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 201 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 206 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 224 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 201 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 201 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 B