From 76ed801aa7cade93b3d4cc7eb0756c83eec43748 Mon Sep 17 00:00:00 2001 From: Ryan Oldenburg Date: Thu, 18 Feb 2021 12:15:53 -0600 Subject: [PATCH] remove windingrule param from stroke proc --- src/pixie/paths.nim | 39 +++++++-------------------------------- 1 file changed, 7 insertions(+), 32 deletions(-) diff --git a/src/pixie/paths.nim b/src/pixie/paths.nim index b009ad4..76ad11d 100644 --- a/src/pixie/paths.nim +++ b/src/pixie/paths.nim @@ -1165,8 +1165,7 @@ proc fillShapes( proc strokeShapes( shapes: seq[seq[Vec2]], - strokeWidth: float32, - windingRule: WindingRule + strokeWidth: float32 ): seq[seq[Vec2]] = if strokeWidth == 0: return @@ -1288,11 +1287,7 @@ proc strokePath*( windingRule = wrNonZero, blendMode = bmNormal ) = - let strokeShapes = strokeShapes( - parseSomePath(path), - strokeWidth, - windingRule - ) + let strokeShapes = strokeShapes(parseSomePath(path), strokeWidth) image.fillShapes(strokeShapes, color, windingRule, blendMode) proc strokePath*( @@ -1304,11 +1299,7 @@ proc strokePath*( windingRule = wrNonZero, blendMode = bmNormal ) = - var strokeShapes = strokeShapes( - parseSomePath(path), - strokeWidth, - windingRule - ) + var strokeShapes = strokeShapes(parseSomePath(path), strokeWidth) for shape in strokeShapes.mitems: for segment in shape.mitems: segment += pos @@ -1323,11 +1314,7 @@ proc strokePath*( windingRule = wrNonZero, blendMode = bmNormal ) = - var strokeShapes = strokeShapes( - parseSomePath(path), - strokeWidth, - windingRule - ) + var strokeShapes = strokeShapes(parseSomePath(path), strokeWidth) for shape in strokeShapes.mitems: for segment in shape.mitems: segment = mat * segment @@ -1339,11 +1326,7 @@ proc strokePath*( strokeWidth = 1.0, windingRule = wrNonZero ) = - let strokeShapes = strokeShapes( - parseSomePath(path), - strokeWidth, - windingRule - ) + let strokeShapes = strokeShapes(parseSomePath(path), strokeWidth) mask.fillShapes(strokeShapes, windingRule) proc strokePath*( @@ -1353,11 +1336,7 @@ proc strokePath*( pos: Vec2, windingRule = wrNonZero ) = - var strokeShapes = strokeShapes( - parseSomePath(path), - strokeWidth, - windingRule - ) + var strokeShapes = strokeShapes(parseSomePath(path), strokeWidth) for shape in strokeShapes.mitems: for segment in shape.mitems: segment += pos @@ -1370,11 +1349,7 @@ proc strokePath*( mat: Mat3, windingRule = wrNonZero ) = - var strokeShapes = strokeShapes( - parseSomePath(path), - strokeWidth, - windingRule - ) + var strokeShapes = strokeShapes(parseSomePath(path), strokeWidth) for shape in strokeShapes.mitems: for segment in shape.mitems: segment = mat * segment