Skip to content

Commit

Permalink
Clear pixel methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Deseteral committed Oct 9, 2023
1 parent de0aa1b commit 4fa76a3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/gfx/screen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 4fa76a3

Please sign in to comment.