Skip to content

Commit

Permalink
refactor(rendering): cleanup useless code
Browse files Browse the repository at this point in the history
ruggero-visintin committed Dec 4, 2023

Verified

This commit was signed with the committer’s verified signature.
alistairewj Alistair Johnson
1 parent 0383256 commit 1287148
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/platform/gfx/CanvasDevice.ts
Original file line number Diff line number Diff line change
@@ -16,20 +16,12 @@ export class CanvasDevice {
}

public fill(ctx: CanvasRenderingContext2D, color?: string): void {
const oldStyle = ctx.fillStyle;

color && (ctx.fillStyle = color);
ctx.fill();

ctx.fillStyle = oldStyle;
}

public stroke(ctx: CanvasRenderingContext2D, color?: string): void {
const oldStyle = ctx.strokeStyle;

color && (ctx.strokeStyle = color);
ctx.stroke();

ctx.strokeStyle = oldStyle;
}
}

0 comments on commit 1287148

Please sign in to comment.