formatting

This commit is contained in:
Ryan Oldenburg 2022-06-15 23:31:24 -05:00
parent 95e2863eae
commit ff3e7e3316

View file

@ -1558,9 +1558,14 @@ proc fillHits(
var prevFilledTo: int var prevFilledTo: int
walkHits hits, numHits, windingRule, y, image.width: walkHits hits, numHits, windingRule, y, image.width:
block: # Clear any gap between this fill and the previous fill block: # Clear any gap between this fill and the previous fill
let gapBetweenHits = fillStart - prevFilledTo let gapBetween = fillStart - prevFilledTo
if gapBetweenHits > 0: if gapBetween > 0:
fillUnsafe(image.data, rgbx(0, 0, 0, 0), image.dataIndex(prevFilledTo, y), gapBetweenHits) fillUnsafe(
image.data,
rgbx(0, 0, 0, 0),
image.dataIndex(prevFilledTo, y),
gapBetween
)
prevFilledTo = filledTo prevFilledTo = filledTo
block: # Handle this fill block: # Handle this fill
if rgbx.a != 255: if rgbx.a != 255:
@ -1596,9 +1601,9 @@ proc fillHits(
of MaskBlend: of MaskBlend:
var prevFilledTo: int var prevFilledTo: int
walkHits hits, numHits, windingRule,y, mask.width: walkHits hits, numHits, windingRule,y, mask.width:
let gapBetweenHits = fillStart - prevFilledTo let gapBetween = fillStart - prevFilledTo
if gapBetweenHits > 0: if gapBetween > 0:
fillUnsafe(mask.data, 0, mask.dataIndex(prevFilledTo, y), gapBetweenHits) fillUnsafe(mask.data, 0, mask.dataIndex(prevFilledTo, y), gapBetween)
prevFilledTo = filledTo prevFilledTo = filledTo
mask.clearUnsafe(0, y, startX, y) mask.clearUnsafe(0, y, startX, y)