Skip to content

Commit 03759cb

Browse files
committed
Define colorAt at declaration.
1 parent da59926 commit 03759cb

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ function bitmap(width, height, byteWidth, bitsPerPixel, bytesPerPixel, image)
1212
this.bitsPerPixel = bitsPerPixel;
1313
this.bytesPerPixel = bytesPerPixel;
1414
this.image = image;
15+
16+
this.colorAt = function(x, y)
17+
{
18+
return robotjs.getColor(this, x, y);
19+
};
1520
}
1621

17-
bitmap.prototype.colorAt = function(x, y)
18-
{
19-
return robotjs.getColor(this, x, y);
20-
};
21-
2222
module.exports.screen.capture = function(x, y, width, height)
2323
{
2424
//If coords have been passed, use them.

0 commit comments

Comments
 (0)