simpler
This commit is contained in:
parent
fe488708cd
commit
0affa5284b
1 changed files with 115 additions and 131 deletions
|
@ -1937,11 +1937,6 @@ proc fillShapes(
|
||||||
if maybeLeftMaxX > maybeRightMaxX:
|
if maybeLeftMaxX > maybeRightMaxX:
|
||||||
swap left, right
|
swap left, right
|
||||||
|
|
||||||
let requiresAntiAliasing =
|
|
||||||
left.segment.requiresAntiAliasing or
|
|
||||||
right.segment.requiresAntiAliasing
|
|
||||||
|
|
||||||
if requiresAntiAliasing:
|
|
||||||
# We have 2 non-intersecting lines that require anti-aliasing
|
# We have 2 non-intersecting lines that require anti-aliasing
|
||||||
# Use trapezoid coverage at the edges and fill in the middle
|
# Use trapezoid coverage at the edges and fill in the middle
|
||||||
|
|
||||||
|
@ -2074,17 +2069,6 @@ proc fillShapes(
|
||||||
inc y
|
inc y
|
||||||
continue
|
continue
|
||||||
|
|
||||||
else:
|
|
||||||
let
|
|
||||||
minX = left.segment.at.x.int.clamp(0, image.width)
|
|
||||||
maxX = right.segment.at.x.int.clamp(0, image.width)
|
|
||||||
hits[0] = (cast[Fixed32](minX * 256), 1.int16)
|
|
||||||
hits[1] = (cast[Fixed32](maxX * 256), -1.int16)
|
|
||||||
image.fillHits(rgbx, 0, y, hits, 2, NonZero, blendMode)
|
|
||||||
|
|
||||||
inc y
|
|
||||||
continue
|
|
||||||
|
|
||||||
computeCoverage(
|
computeCoverage(
|
||||||
cast[ptr UncheckedArray[uint8]](coverages[0].addr),
|
cast[ptr UncheckedArray[uint8]](coverages[0].addr),
|
||||||
hits,
|
hits,
|
||||||
|
|
Loading…
Reference in a new issue