Пример #1
0
 @Override
 public void write(Screen screen) {
   byte[] pixels = screen.getRenderController().getScreenRaw();
   for (int i = 0; i < width; ++i) {
     for (int j = 0; j < height; ++j) {
       pixels[(i + x) + (j * height + y)] = selected[i + j * height];
     }
   }
 }
Пример #2
0
 @Override
 public SelectedArea select(Screen screen, int x, int y) {
   byte[] pixels = screen.getRenderController().getScreenRaw();
   byte[] selected = new byte[width * height];
   for (int i = 0; i < width; ++i) {
     for (int j = 0; j < height; ++j) {
       selected[i + j * height] = pixels[(i + x) + (j * height + y)];
     }
   }
   return new BoxSelectedArea(selected, width, height, x, y);
 }