Skip to content

Commit 0861658

Browse files
committed
drawBox: floor components
1 parent fae8977 commit 0861658

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎ImageScript.js‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -464,8 +464,10 @@ export class Image {
464464
* @returns {Image}
465465
*/
466466
drawBox(x, y, width, height, color) {
467-
x -= 1;
468-
y -= 1;
467+
x = ~~(x - 1);
468+
y = ~~(y - 1);
469+
width = ~~width;
470+
height = ~~height;
469471

470472
if (typeof color === 'function') {
471473
for (let tY = 1; tY <= height; tY++) {

0 commit comments

Comments
 (0)