diff --git a/tests/fuzz_image_draw.nim b/tests/fuzz_image_draw.nim index d8d43b8..1271156 100644 --- a/tests/fuzz_image_draw.nim +++ b/tests/fuzz_image_draw.nim @@ -25,3 +25,31 @@ for i in 0 ..< 250: a.draw(b, translate(vec2(translation.x.trunc, translation.y.trunc))) a.draw(b, translate(translation)) + +for i in 0 ..< 25: + let a = newImage(rand(1 .. 20), rand(1 .. 20)) + for j in 0 ..< 25: + let b = newImage(rand(1 .. 20), rand(1 .. 20)) + + let + translation = vec2(rand(25.0), rand(25.0)) - vec2(5, 5) + rotation = rand(2 * PI).float32 + + echo a, " ", b, " ", translation, " ", rotation + + a.draw(b, translate(vec2(translation.x, translation.y))) + a.draw(b, translate(translation) * rotate(rotation)) + +for i in 0 ..< 25: + let a = newImage(rand(1 .. 2000), rand(1 .. 2000)) + for j in 0 ..< 25: + let b = newImage(rand(1 .. 1000), rand(1 .. 1000)) + + let + translation = vec2(rand(2500.0), rand(2500.0)) - vec2(500, 500) + rotation = rand(2 * PI).float32 + + echo a, " ", b, " ", translation, " ", rotation + + a.draw(b, translate(vec2(translation.x, translation.y))) + a.draw(b, translate(translation) * rotate(rotation)) diff --git a/tests/fuzz_image_draw_smooth.nim b/tests/fuzz_image_draw_smooth.nim deleted file mode 100644 index 0a80cd8..0000000 --- a/tests/fuzz_image_draw_smooth.nim +++ /dev/null @@ -1,31 +0,0 @@ -import pixie, random - -randomize() - -for i in 0 ..< 25: - let a = newImage(rand(1 .. 20), rand(1 .. 20)) - for j in 0 ..< 25: - let b = newImage(rand(1 .. 20), rand(1 .. 20)) - - let - translation = vec2(rand(25.0), rand(25.0)) - vec2(5, 5) - rotation = rand(2 * PI).float32 - - echo a, " ", b, " ", translation, " ", rotation - - a.draw(b, translate(vec2(translation.x.trunc, translation.y.trunc))) - a.draw(b, translate(translation) * rotate(rotation)) - -for i in 0 ..< 25: - let a = newImage(rand(1 .. 2000), rand(1 .. 2000)) - for j in 0 ..< 25: - let b = newImage(rand(1 .. 1000), rand(1 .. 1000)) - - let - translation = vec2(rand(2500.0), rand(2500.0)) - vec2(500, 500) - rotation = rand(2 * PI).float32 - - echo a, " ", b, " ", translation, " ", rotation - - a.draw(b, translate(vec2(translation.x.trunc, translation.y.trunc))) - a.draw(b, translate(translation) * rotate(rotation))