strokes always wrNonZero
This commit is contained in:
parent
bca5119e8b
commit
7b0bd8753f
2 changed files with 11 additions and 18 deletions
|
@ -142,13 +142,12 @@ proc strokeSegment*(
|
|||
image: Image,
|
||||
segment: Segment,
|
||||
color: ColorRGBA,
|
||||
strokeWidth = 1.0,
|
||||
blendMode = bmNormal
|
||||
strokeWidth = 1.0
|
||||
) =
|
||||
var path: Path
|
||||
path.moveTo(segment.at)
|
||||
path.lineTo(segment.to)
|
||||
image.strokePath(path, color, strokeWidth, wrNonZero, blendMode)
|
||||
image.strokePath(path, color, strokeWidth)
|
||||
|
||||
proc strokeSegment*(mask: Mask, segment: Segment, strokeWidth: float32) =
|
||||
var path: Path
|
||||
|
|
|
@ -1320,11 +1320,10 @@ proc strokePath*(
|
|||
path: SomePath,
|
||||
color: ColorRGBA,
|
||||
strokeWidth = 1.0,
|
||||
windingRule = wrNonZero,
|
||||
blendMode = bmNormal
|
||||
) =
|
||||
let strokeShapes = strokeShapes(parseSomePath(path), strokeWidth)
|
||||
image.fillShapes(strokeShapes, color, windingRule, blendMode)
|
||||
image.fillShapes(strokeShapes, color, wrNonZero, blendMode)
|
||||
|
||||
proc strokePath*(
|
||||
image: Image,
|
||||
|
@ -1332,14 +1331,13 @@ proc strokePath*(
|
|||
color: ColorRGBA,
|
||||
strokeWidth = 1.0,
|
||||
pos: Vec2,
|
||||
windingRule = wrNonZero,
|
||||
blendMode = bmNormal
|
||||
) =
|
||||
var strokeShapes = strokeShapes(parseSomePath(path), strokeWidth)
|
||||
for shape in strokeShapes.mitems:
|
||||
for segment in shape.mitems:
|
||||
segment += pos
|
||||
image.fillShapes(strokeShapes, color, windingRule, blendMode)
|
||||
image.fillShapes(strokeShapes, color, wrNonZero, blendMode)
|
||||
|
||||
proc strokePath*(
|
||||
image: Image,
|
||||
|
@ -1347,49 +1345,45 @@ proc strokePath*(
|
|||
color: ColorRGBA,
|
||||
strokeWidth = 1.0,
|
||||
mat: Mat3,
|
||||
windingRule = wrNonZero,
|
||||
blendMode = bmNormal
|
||||
) =
|
||||
var strokeShapes = strokeShapes(parseSomePath(path), strokeWidth)
|
||||
for shape in strokeShapes.mitems:
|
||||
for segment in shape.mitems:
|
||||
segment = mat * segment
|
||||
image.fillShapes(strokeShapes, color, windingRule, blendMode)
|
||||
image.fillShapes(strokeShapes, color, wrNonZero, blendMode)
|
||||
|
||||
proc strokePath*(
|
||||
mask: Mask,
|
||||
path: SomePath,
|
||||
strokeWidth = 1.0,
|
||||
windingRule = wrNonZero
|
||||
strokeWidth = 1.0
|
||||
) =
|
||||
let strokeShapes = strokeShapes(parseSomePath(path), strokeWidth)
|
||||
mask.fillShapes(strokeShapes, windingRule)
|
||||
mask.fillShapes(strokeShapes, wrNonZero)
|
||||
|
||||
proc strokePath*(
|
||||
mask: Mask,
|
||||
path: SomePath,
|
||||
strokeWidth = 1.0,
|
||||
pos: Vec2,
|
||||
windingRule = wrNonZero
|
||||
pos: Vec2
|
||||
) =
|
||||
var strokeShapes = strokeShapes(parseSomePath(path), strokeWidth)
|
||||
for shape in strokeShapes.mitems:
|
||||
for segment in shape.mitems:
|
||||
segment += pos
|
||||
mask.fillShapes(strokeShapes, windingRule)
|
||||
mask.fillShapes(strokeShapes, wrNonZero)
|
||||
|
||||
proc strokePath*(
|
||||
mask: Mask,
|
||||
path: SomePath,
|
||||
strokeWidth = 1.0,
|
||||
mat: Mat3,
|
||||
windingRule = wrNonZero
|
||||
mat: Mat3
|
||||
) =
|
||||
var strokeShapes = strokeShapes(parseSomePath(path), strokeWidth)
|
||||
for shape in strokeShapes.mitems:
|
||||
for segment in shape.mitems:
|
||||
segment = mat * segment
|
||||
mask.fillShapes(strokeShapes, windingRule)
|
||||
mask.fillShapes(strokeShapes, wrNonZero)
|
||||
|
||||
when defined(release):
|
||||
{.pop.}
|
||||
|
|
Loading…
Reference in a new issue