From ecfce829ae6dcbd2630061ae4d2eaa22671c6246 Mon Sep 17 00:00:00 2001 From: Ryan Oldenburg Date: Mon, 6 Jun 2022 00:29:57 -0500 Subject: [PATCH] better --- tests/benchmark_paths.nim | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/tests/benchmark_paths.nim b/tests/benchmark_paths.nim index 6151535..a643ea6 100644 --- a/tests/benchmark_paths.nim +++ b/tests/benchmark_paths.nim @@ -22,28 +22,26 @@ const radius = 20 let path = newPath() -path.roundedRect(0.5, 0.5, 499, 299, radius, radius, radius, radius) +path.rect(0, 0, 500, 300) +# path.roundedRect(0.5, 0.5, 499, 299, radius, radius, radius, radius) # path.roundedRect(0, 0, 500, 300, radius, radius, radius, radius) +let paint = newPaint(SolidPaint) +paint.color = color(0, 0, 0, 0.5) + timeIt "roundedRect Image OverwriteBlend": - let paint = newPaint(SolidPaint) - paint.color = color(0, 0, 0, 1) paint.blendMode = OverwriteBlend let image = newImage(width, height) image.fillPath(path, paint) timeIt "roundedRect Image NormalBlend": - let paint = newPaint(SolidPaint) - paint.color = color(0, 0, 0, 1) paint.blendMode = NormalBlend let image = newImage(width, height) image.fillPath(path, paint) timeIt "roundedRect Image MaskBlend": - let paint = newPaint(SolidPaint) - paint.color = color(0, 0, 0, 1) paint.blendMode = MaskBlend let image = newImage(width, height)