Skip to content

Commit

Permalink
Much better fill/stroke composition
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanR712 committed May 10, 2024
1 parent baa7b7a commit bce3315
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/SharedToolUtils/DrawUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}

Expand Down Expand Up @@ -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();
}
}

Expand Down

0 comments on commit bce3315

Please sign in to comment.