remove windingrule param from stroke proc
This commit is contained in:
parent
c3cfc456f4
commit
76ed801aa7
1 changed files with 7 additions and 32 deletions
|
@ -1165,8 +1165,7 @@ proc fillShapes(
|
||||||
|
|
||||||
proc strokeShapes(
|
proc strokeShapes(
|
||||||
shapes: seq[seq[Vec2]],
|
shapes: seq[seq[Vec2]],
|
||||||
strokeWidth: float32,
|
strokeWidth: float32
|
||||||
windingRule: WindingRule
|
|
||||||
): seq[seq[Vec2]] =
|
): seq[seq[Vec2]] =
|
||||||
if strokeWidth == 0:
|
if strokeWidth == 0:
|
||||||
return
|
return
|
||||||
|
@ -1288,11 +1287,7 @@ proc strokePath*(
|
||||||
windingRule = wrNonZero,
|
windingRule = wrNonZero,
|
||||||
blendMode = bmNormal
|
blendMode = bmNormal
|
||||||
) =
|
) =
|
||||||
let strokeShapes = strokeShapes(
|
let strokeShapes = strokeShapes(parseSomePath(path), strokeWidth)
|
||||||
parseSomePath(path),
|
|
||||||
strokeWidth,
|
|
||||||
windingRule
|
|
||||||
)
|
|
||||||
image.fillShapes(strokeShapes, color, windingRule, blendMode)
|
image.fillShapes(strokeShapes, color, windingRule, blendMode)
|
||||||
|
|
||||||
proc strokePath*(
|
proc strokePath*(
|
||||||
|
@ -1304,11 +1299,7 @@ proc strokePath*(
|
||||||
windingRule = wrNonZero,
|
windingRule = wrNonZero,
|
||||||
blendMode = bmNormal
|
blendMode = bmNormal
|
||||||
) =
|
) =
|
||||||
var strokeShapes = strokeShapes(
|
var strokeShapes = strokeShapes(parseSomePath(path), strokeWidth)
|
||||||
parseSomePath(path),
|
|
||||||
strokeWidth,
|
|
||||||
windingRule
|
|
||||||
)
|
|
||||||
for shape in strokeShapes.mitems:
|
for shape in strokeShapes.mitems:
|
||||||
for segment in shape.mitems:
|
for segment in shape.mitems:
|
||||||
segment += pos
|
segment += pos
|
||||||
|
@ -1323,11 +1314,7 @@ proc strokePath*(
|
||||||
windingRule = wrNonZero,
|
windingRule = wrNonZero,
|
||||||
blendMode = bmNormal
|
blendMode = bmNormal
|
||||||
) =
|
) =
|
||||||
var strokeShapes = strokeShapes(
|
var strokeShapes = strokeShapes(parseSomePath(path), strokeWidth)
|
||||||
parseSomePath(path),
|
|
||||||
strokeWidth,
|
|
||||||
windingRule
|
|
||||||
)
|
|
||||||
for shape in strokeShapes.mitems:
|
for shape in strokeShapes.mitems:
|
||||||
for segment in shape.mitems:
|
for segment in shape.mitems:
|
||||||
segment = mat * segment
|
segment = mat * segment
|
||||||
|
@ -1339,11 +1326,7 @@ proc strokePath*(
|
||||||
strokeWidth = 1.0,
|
strokeWidth = 1.0,
|
||||||
windingRule = wrNonZero
|
windingRule = wrNonZero
|
||||||
) =
|
) =
|
||||||
let strokeShapes = strokeShapes(
|
let strokeShapes = strokeShapes(parseSomePath(path), strokeWidth)
|
||||||
parseSomePath(path),
|
|
||||||
strokeWidth,
|
|
||||||
windingRule
|
|
||||||
)
|
|
||||||
mask.fillShapes(strokeShapes, windingRule)
|
mask.fillShapes(strokeShapes, windingRule)
|
||||||
|
|
||||||
proc strokePath*(
|
proc strokePath*(
|
||||||
|
@ -1353,11 +1336,7 @@ proc strokePath*(
|
||||||
pos: Vec2,
|
pos: Vec2,
|
||||||
windingRule = wrNonZero
|
windingRule = wrNonZero
|
||||||
) =
|
) =
|
||||||
var strokeShapes = strokeShapes(
|
var strokeShapes = strokeShapes(parseSomePath(path), strokeWidth)
|
||||||
parseSomePath(path),
|
|
||||||
strokeWidth,
|
|
||||||
windingRule
|
|
||||||
)
|
|
||||||
for shape in strokeShapes.mitems:
|
for shape in strokeShapes.mitems:
|
||||||
for segment in shape.mitems:
|
for segment in shape.mitems:
|
||||||
segment += pos
|
segment += pos
|
||||||
|
@ -1370,11 +1349,7 @@ proc strokePath*(
|
||||||
mat: Mat3,
|
mat: Mat3,
|
||||||
windingRule = wrNonZero
|
windingRule = wrNonZero
|
||||||
) =
|
) =
|
||||||
var strokeShapes = strokeShapes(
|
var strokeShapes = strokeShapes(parseSomePath(path), strokeWidth)
|
||||||
parseSomePath(path),
|
|
||||||
strokeWidth,
|
|
||||||
windingRule
|
|
||||||
)
|
|
||||||
for shape in strokeShapes.mitems:
|
for shape in strokeShapes.mitems:
|
||||||
for segment in shape.mitems:
|
for segment in shape.mitems:
|
||||||
segment = mat * segment
|
segment = mat * segment
|
||||||
|
|
Loading…
Reference in a new issue