Skip to content

Commit

Permalink
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.