From bce3315e9d1e87278eb91e6d9db069fff9315432 Mon Sep 17 00:00:00 2001 From: Ryan Reilly Date: Fri, 10 May 2024 09:27:25 -0400 Subject: [PATCH] Much better fill/stroke composition --- src/SharedToolUtils/DrawUtils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SharedToolUtils/DrawUtils.ts b/src/SharedToolUtils/DrawUtils.ts index c236e14d..f4a19c10 100644 --- a/src/SharedToolUtils/DrawUtils.ts +++ b/src/SharedToolUtils/DrawUtils.ts @@ -56,13 +56,13 @@ export function drawCut(thisCut: CutNode, color: string): void { 2 * Math.PI ); ctx.globalCompositeOperation = "destination-over"; - ctx.stroke(); ctx.fillStyle = TreeContext.tree.getLevel(thisCut) % 2 === 0 ? cssVar("--canvas-odd-bg") : cssVar("--canvas-bg"); ctx.fill(); ctx.globalCompositeOperation = "source-over"; + ctx.stroke(); } } @@ -211,13 +211,13 @@ function redrawCut(incomingNode: CutNode, color?: string): void { 2 * Math.PI ); ctx.globalCompositeOperation = "destination-over"; - ctx.stroke(); ctx.fillStyle = TreeContext.tree.getLevel(incomingNode) % 2 === 0 ? cssVar("--canvas-odd-bg") : cssVar("--canvas-bg"); ctx.fill(); ctx.globalCompositeOperation = "source-over"; + ctx.stroke(); } }