﻿if ( !window.Graphics )
    window.Graphics = {};
    
Graphics.Rectangle = function( x,y,w,h )
{
    this.x = x;
    this.y = y;
    this.width = w;
    this.height = h;
}

Graphics.Rectangle.prototype.width = 0;
Graphics.Rectangle.prototype.height = 0;
Graphics.Rectangle.prototype.x = 0;
Graphics.Rectangle.prototype.y = 0;

Graphics.Rectangle.prototype.hitTest = function( point )
{
    if ( point.x >= this.x && point.x <= (this.x+this.width) && point.y >= this.y && point.y <= (this.y+this.height) )
        return true;
    return false;
}