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,
|
image: Image,
|
||||||
segment: Segment,
|
segment: Segment,
|
||||||
color: ColorRGBA,
|
color: ColorRGBA,
|
||||||
strokeWidth = 1.0,
|
strokeWidth = 1.0
|
||||||
blendMode = bmNormal
|
|
||||||
) =
|
) =
|
||||||
var path: Path
|
var path: Path
|
||||||
path.moveTo(segment.at)
|
path.moveTo(segment.at)
|
||||||
path.lineTo(segment.to)
|
path.lineTo(segment.to)
|
||||||
image.strokePath(path, color, strokeWidth, wrNonZero, blendMode)
|
image.strokePath(path, color, strokeWidth)
|
||||||
|
|
||||||
proc strokeSegment*(mask: Mask, segment: Segment, strokeWidth: float32) =
|
proc strokeSegment*(mask: Mask, segment: Segment, strokeWidth: float32) =
|
||||||
var path: Path
|
var path: Path
|
||||||
|
|
|
@ -1320,11 +1320,10 @@ proc strokePath*(
|
||||||
path: SomePath,
|
path: SomePath,
|
||||||
color: ColorRGBA,
|
color: ColorRGBA,
|
||||||
strokeWidth = 1.0,
|
strokeWidth = 1.0,
|
||||||
windingRule = wrNonZero,
|
|
||||||
blendMode = bmNormal
|
blendMode = bmNormal
|
||||||
) =
|
) =
|
||||||
let strokeShapes = strokeShapes(parseSomePath(path), strokeWidth)
|
let strokeShapes = strokeShapes(parseSomePath(path), strokeWidth)
|
||||||
image.fillShapes(strokeShapes, color, windingRule, blendMode)
|
image.fillShapes(strokeShapes, color, wrNonZero, blendMode)
|
||||||
|
|
||||||
proc strokePath*(
|
proc strokePath*(
|
||||||
image: Image,
|
image: Image,
|
||||||
|
@ -1332,14 +1331,13 @@ proc strokePath*(
|
||||||
color: ColorRGBA,
|
color: ColorRGBA,
|
||||||
strokeWidth = 1.0,
|
strokeWidth = 1.0,
|
||||||
pos: Vec2,
|
pos: Vec2,
|
||||||
windingRule = wrNonZero,
|
|
||||||
blendMode = bmNormal
|
blendMode = bmNormal
|
||||||
) =
|
) =
|
||||||
var strokeShapes = strokeShapes(parseSomePath(path), strokeWidth)
|
var strokeShapes = strokeShapes(parseSomePath(path), strokeWidth)
|
||||||
for shape in strokeShapes.mitems:
|
for shape in strokeShapes.mitems:
|
||||||
for segment in shape.mitems:
|
for segment in shape.mitems:
|
||||||
segment += pos
|
segment += pos
|
||||||
image.fillShapes(strokeShapes, color, windingRule, blendMode)
|
image.fillShapes(strokeShapes, color, wrNonZero, blendMode)
|
||||||
|
|
||||||
proc strokePath*(
|
proc strokePath*(
|
||||||
image: Image,
|
image: Image,
|
||||||
|
@ -1347,49 +1345,45 @@ proc strokePath*(
|
||||||
color: ColorRGBA,
|
color: ColorRGBA,
|
||||||
strokeWidth = 1.0,
|
strokeWidth = 1.0,
|
||||||
mat: Mat3,
|
mat: Mat3,
|
||||||
windingRule = wrNonZero,
|
|
||||||
blendMode = bmNormal
|
blendMode = bmNormal
|
||||||
) =
|
) =
|
||||||
var strokeShapes = strokeShapes(parseSomePath(path), strokeWidth)
|
var strokeShapes = strokeShapes(parseSomePath(path), strokeWidth)
|
||||||
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
|
||||||
image.fillShapes(strokeShapes, color, windingRule, blendMode)
|
image.fillShapes(strokeShapes, color, wrNonZero, blendMode)
|
||||||
|
|
||||||
proc strokePath*(
|
proc strokePath*(
|
||||||
mask: Mask,
|
mask: Mask,
|
||||||
path: SomePath,
|
path: SomePath,
|
||||||
strokeWidth = 1.0,
|
strokeWidth = 1.0
|
||||||
windingRule = wrNonZero
|
|
||||||
) =
|
) =
|
||||||
let strokeShapes = strokeShapes(parseSomePath(path), strokeWidth)
|
let strokeShapes = strokeShapes(parseSomePath(path), strokeWidth)
|
||||||
mask.fillShapes(strokeShapes, windingRule)
|
mask.fillShapes(strokeShapes, wrNonZero)
|
||||||
|
|
||||||
proc strokePath*(
|
proc strokePath*(
|
||||||
mask: Mask,
|
mask: Mask,
|
||||||
path: SomePath,
|
path: SomePath,
|
||||||
strokeWidth = 1.0,
|
strokeWidth = 1.0,
|
||||||
pos: Vec2,
|
pos: Vec2
|
||||||
windingRule = wrNonZero
|
|
||||||
) =
|
) =
|
||||||
var strokeShapes = strokeShapes(parseSomePath(path), strokeWidth)
|
var strokeShapes = strokeShapes(parseSomePath(path), strokeWidth)
|
||||||
for shape in strokeShapes.mitems:
|
for shape in strokeShapes.mitems:
|
||||||
for segment in shape.mitems:
|
for segment in shape.mitems:
|
||||||
segment += pos
|
segment += pos
|
||||||
mask.fillShapes(strokeShapes, windingRule)
|
mask.fillShapes(strokeShapes, wrNonZero)
|
||||||
|
|
||||||
proc strokePath*(
|
proc strokePath*(
|
||||||
mask: Mask,
|
mask: Mask,
|
||||||
path: SomePath,
|
path: SomePath,
|
||||||
strokeWidth = 1.0,
|
strokeWidth = 1.0,
|
||||||
mat: Mat3,
|
mat: Mat3
|
||||||
windingRule = wrNonZero
|
|
||||||
) =
|
) =
|
||||||
var strokeShapes = strokeShapes(parseSomePath(path), strokeWidth)
|
var strokeShapes = strokeShapes(parseSomePath(path), strokeWidth)
|
||||||
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
|
||||||
mask.fillShapes(strokeShapes, windingRule)
|
mask.fillShapes(strokeShapes, wrNonZero)
|
||||||
|
|
||||||
when defined(release):
|
when defined(release):
|
||||||
{.pop.}
|
{.pop.}
|
||||||
|
|
Loading…
Reference in a new issue