Skip to content

Commit

Permalink
Screen code regions
Browse files Browse the repository at this point in the history
  • Loading branch information
Deseteral committed Oct 12, 2023
1 parent 348181b commit 1be0c34
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions src/gfx/screen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ export class Screen {
this._ctx.fillStyle = prevColor;
}

/*
****************************************************************************
* drawPixel*
****************************************************************************
*/

/**
* Makes pixel at given position transparent.
*/
Expand Down Expand Up @@ -94,6 +100,12 @@ export class Screen {
this.drawRect((x | 0), (y | 0), 1, 1);
}

/*
****************************************************************************
* drawLine*
****************************************************************************
*/

/**
* Draws line between two points.
*/
Expand Down Expand Up @@ -122,6 +134,12 @@ export class Screen {
this.line(x1, y1, x2, y2, true);
}

/*
****************************************************************************
* drawRect*
****************************************************************************
*/

/**
* Draws rectangle border with upper-left corner at specified position and provided width and height.
*/
Expand Down Expand Up @@ -168,6 +186,12 @@ export class Screen {
this._ctx.clearRect((x | 0), (y | 0), w, h);
}

/*
****************************************************************************
* drawCircle*
****************************************************************************
*/

/**
* Draws circle border with its center at specified position with given radius.
*/
Expand Down Expand Up @@ -204,6 +228,12 @@ export class Screen {
this.circ(x, y, radius, true, true);
}

/*
****************************************************************************
* drawTexture*
****************************************************************************
*/

/**
* Draws entire texture at given position, with optional scaling by `w`, `h` parameters.
* Allow for horizontal and vertical flipping using `FLIP_H` and `FLIP_V` bitmask options.
Expand Down

0 comments on commit 1be0c34

Please sign in to comment.