From ca83c9d5501ec7dd1200f61573b58d88524889b5 Mon Sep 17 00:00:00 2001 From: Deseteral Date: Thu, 12 Oct 2023 22:06:43 +0200 Subject: [PATCH] clearRectLines --- src/gfx/screen.ts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/gfx/screen.ts b/src/gfx/screen.ts index 59c2334..5b0308d 100644 --- a/src/gfx/screen.ts +++ b/src/gfx/screen.ts @@ -161,6 +161,27 @@ export class Screen { this.rect(x, y, w, h, false); } + /** + * Clears pixels in rectangle border with upper-left corner at specified position and provided width and height. + */ + public clearRectLinesV(position: Vector2, w: number, h: number): void { + this.clearRectLines(position.x, position.y, w, h); + } + + /** + * Clears pixels in rectangle border. + */ + public clearRectLinesR(rect: Rectangle): void { + this.clearRectLines(rect.x, rect.y, rect.width, rect.height); + } + + /** + * Clears pixel in rectangle border with upper-left corner at specified position and provided width and height. + */ + public clearRectLines(x: number, y: number, w: number, h: number): void { + this.rect(x, y, w, h, true); + } + /* **************************************************************************** * drawRect*