编程语言

img langzi84

java实现屏幕取色

发表于2004/10/21 22:26:00  3201人阅读

分类: JAVA相关

  
  Color pixel = new Color(0,0,0);
  Robot robot;
  Point mousepoint;
  int R,G,B;
  MouseInfo mouseinfo;
  robot = new Robot();
  mousepoint = mouseinfo.getPointerInfo().getLocation();
  pixel = robot.getPixelColor(mousepoint.x,mousepoint.y);
  R = pixel.getRed();
  G = pixel.getGreen();
  B = pixel.getBlue();
阅读全文
0 0

相关文章推荐

img
取 消
img