Untitled
By: a guest | Mar 15th, 2010 | Syntax:
None | Size: 0.79 KB | Hits: 42 | Expires: Never
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package punkbuster.scraper.pattern;
import java.awt.Robot;
/**
*
* @author Andreas Böck
*/
public class RectangleScraper {
private Rectangle colorRect;
private int width;
private int height;
public RectangleScraper(int windowx, int windowy, int width, int height, Robot robo){
this.width = width;
this.height = height;
colorRect = new Rectangle(width,height);
for (int x=0;x<width;x++){
for (int y=0;y<height;y++){
colorRect.setPixel(x, y , robo.getPixelColor(windowx+x, windowy+y));
}
}
}
public Rectangle getColorRect() {
return colorRect;
}
}