mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 11:08:12 +02:00
[test] Fix the order of random points random-intersections-curves*.
The calls to uniform_random() to get the curve points were in the function arguments, but argument order evaluation is compiler implementation dependent.
This commit is contained in:
parent
9e45673e19
commit
316c1683ce
2 changed files with 20 additions and 14 deletions
|
|
@ -54,13 +54,16 @@ draw (cairo_t *cr, int width, int height)
|
|||
|
||||
cairo_move_to (cr, 0, 0);
|
||||
for (i = 0; i < NUM_SEGMENTS; i++) {
|
||||
cairo_curve_to (cr,
|
||||
uniform_random (-SIZE, SIZE),
|
||||
uniform_random (-SIZE, SIZE),
|
||||
uniform_random (-SIZE, SIZE),
|
||||
uniform_random (-SIZE, SIZE),
|
||||
uniform_random (0, SIZE),
|
||||
uniform_random (0, SIZE));
|
||||
double y3 = uniform_random (0, SIZE);
|
||||
double x3 = uniform_random (0, SIZE);
|
||||
double y2 = uniform_random (-SIZE, SIZE);
|
||||
double x2 = uniform_random (-SIZE, SIZE);
|
||||
double y1 = uniform_random (-SIZE, SIZE);
|
||||
double x1 = uniform_random (-SIZE, SIZE);
|
||||
cairo_curve_to (cr,
|
||||
x1, y1,
|
||||
x2, y2,
|
||||
x3, y3);
|
||||
}
|
||||
cairo_close_path (cr);
|
||||
|
||||
|
|
|
|||
|
|
@ -54,13 +54,16 @@ draw (cairo_t *cr, int width, int height)
|
|||
|
||||
cairo_move_to (cr, 0, 0);
|
||||
for (i = 0; i < NUM_SEGMENTS; i++) {
|
||||
cairo_curve_to (cr,
|
||||
uniform_random (-SIZE, SIZE),
|
||||
uniform_random (-SIZE, SIZE),
|
||||
uniform_random (-SIZE, SIZE),
|
||||
uniform_random (-SIZE, SIZE),
|
||||
uniform_random (0, SIZE),
|
||||
uniform_random (0, SIZE));
|
||||
double y3 = uniform_random (0, SIZE);
|
||||
double x3 = uniform_random (0, SIZE);
|
||||
double y2 = uniform_random (-SIZE, SIZE);
|
||||
double x2 = uniform_random (-SIZE, SIZE);
|
||||
double y1 = uniform_random (-SIZE, SIZE);
|
||||
double x1 = uniform_random (-SIZE, SIZE);
|
||||
cairo_curve_to (cr,
|
||||
x1, y1,
|
||||
x2, y2,
|
||||
x3, y3);
|
||||
}
|
||||
cairo_close_path (cr);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue