From 4fa76a3dc600327f2110e15686c313c63b78175e Mon Sep 17 00:00:00 2001 From: Deseteral Date: Tue, 10 Oct 2023 01:47:02 +0200 Subject: [PATCH] Clear pixel methods --- src/gfx/screen.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/gfx/screen.ts b/src/gfx/screen.ts index 946c7f2..e1ef30f 100644 --- a/src/gfx/screen.ts +++ b/src/gfx/screen.ts @@ -80,6 +80,16 @@ export class Screen { this.fillRect((x | 0), (y | 0), 1, 1); } + /** + * Makes pixel at given position transparent. + */ + public clearPixelV(position: Vector2): void { + this.clearPixel(position.x, position.y); + } + + /** + * Makes pixel at given position transparent. + */ public clearPixel(x: number, y: number): void { this.clearRect((x | 0), (y | 0), 1, 1); }