Skip to content

Commit

Permalink
fix linewidth
Browse files Browse the repository at this point in the history
  • Loading branch information
c298lee committed Feb 21, 2025
1 parent 766e036 commit aa80b58
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ function drawRect(rect: Rect, ctx: CanvasRenderingContext2D, scale: number = 1):
computedStyle.getPropertyValue('--accent-background');
}
ctx.strokeStyle = strokeColor || 'white';
ctx.lineWidth = 2;
ctx.strokeRect(scaledX + 1, scaledY + 1, scaledWidth - 2, scaledHeight - 2);

break;
Expand Down Expand Up @@ -249,6 +248,7 @@ export function ScreenshotEditorFactory({
ctx.fillRect(0, 0, graywashCanvas.width, graywashCanvas.height);
}

ctx.lineWidth = 2;
const scale = graywashCanvas.clientWidth / imageBuffer.width;
drawCommands.forEach(rect => {
drawRect(rect, ctx, scale);
Expand Down

0 comments on commit aa80b58

Please sign in to comment.