From 6fd7df9b234d37f3b59c0316d06d6b39201d7709 Mon Sep 17 00:00:00 2001 From: Ryan Oldenburg Date: Mon, 8 Feb 2021 21:24:20 -0600 Subject: [PATCH] shortcut --- src/pixie/masks.nim | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pixie/masks.nim b/src/pixie/masks.nim index 805d621..ed0b013 100644 --- a/src/pixie/masks.nim +++ b/src/pixie/masks.nim @@ -116,6 +116,10 @@ proc applyOpacity*(mask: Mask, opacity: float32) = ## Multiplies the values of the mask by opacity. let opacity = round(255 * opacity).uint16 + if opacity == 0: + mask.fill(0) + return + var i: int when defined(amd64) and not defined(pixieNoSimd): let