const addon = require('./build/Release/addon');


//Define our stuff
function draw(){
	this.color = {
		r: 0,
		g: 0,
		b: 0,
	};
};

module.exports = draw;

draw.prototype = {
	
    colorChange: function(r,g,b){
		addon.changeColor(r,g,b); //Sets color to green-ish
	},
	
	moveTo: function(x, y){
		addon.moveTo(x, y); //Move to x, y
	},
	
	lineTo: function(x, y){
		addon.lineTo(x, y); //Draw a line from x to y
	},
	
	rect: function(x, y, w, h){
		addon.rect(x, y, w, h); //Draw a rectangle
	},
	
	target: function(x, y){
		addon.target(x, y); //move mouse in game
	},
	
	pxC: function(x, y){
		return {
			r: addon.getR(x, y),
			g: addon.getG(x, y),
			b: addon.getB(x, y),
		}
	},
	
};