Skip to content

Commit

Permalink
Define colorAt at declaration.
Browse files Browse the repository at this point in the history
  • Loading branch information
octalmage committed Jan 6, 2016
1 parent da59926 commit 03759cb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ function bitmap(width, height, byteWidth, bitsPerPixel, bytesPerPixel, image)
this.bitsPerPixel = bitsPerPixel;
this.bytesPerPixel = bytesPerPixel;
this.image = image;

this.colorAt = function(x, y)
{
return robotjs.getColor(this, x, y);
};
}

bitmap.prototype.colorAt = function(x, y)
{
return robotjs.getColor(this, x, y);
};

module.exports.screen.capture = function(x, y, width, height)
{
//If coords have been passed, use them.
Expand Down

0 comments on commit 03759cb

Please # to comment.