From 95e2863eae46a183522ec512906d8bbf814f0cec Mon Sep 17 00:00:00 2001 From: Ryan Oldenburg Date: Wed, 15 Jun 2022 22:40:08 -0500 Subject: [PATCH] masking skip 255 --- src/pixie/paths.nim | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/pixie/paths.nim b/src/pixie/paths.nim index d74a11c..a671bde 100644 --- a/src/pixie/paths.nim +++ b/src/pixie/paths.nim @@ -1563,11 +1563,12 @@ proc fillHits( fillUnsafe(image.data, rgbx(0, 0, 0, 0), image.dataIndex(prevFilledTo, y), gapBetweenHits) prevFilledTo = filledTo block: # Handle this fill - var x = fillStart - simdBlob(image, x, blendMaskSimd) - for x in x ..< fillStart + fillLen: - let backdrop = image.unsafe[x, y] - image.unsafe[x, y] = blendMask(backdrop, rgbx) + if rgbx.a != 255: + var x = fillStart + simdBlob(image, x, blendMaskSimd) + for x in x ..< fillStart + fillLen: + let backdrop = image.unsafe[x, y] + image.unsafe[x, y] = blendMask(backdrop, rgbx) image.clearUnsafe(0, y, startX, y) image.clearUnsafe(filledTo, y, image.width, y)