Example #1
0
 /** * SourceImage ******************* */
 private static MineImage createOffi(UnitMap map, int x, int y) {
   BufferedImage offi = new BufferedImage(32, 32, BufferedImage.TYPE_INT_ARGB);
   MineGraphics offg = new GraphicsAWT(offi.getGraphics());
   int img = map.getData(Page.P20, x, y);
   int sts = map.getData(Page.P50, x, y);
   map.setData(Page.P20, x, y, 0);
   map.setData(Page.P30, x, y, 0);
   map.setData(Page.P50, x, y, 0);
   offg.drawImage(map.getBuffer(x, y), 0, 0);
   map.setData(Page.P20, x, y, img);
   map.setData(Page.P50, x, y, sts);
   return new ImageAWT(offi);
 }
Example #2
0
 /** * Paint ******************************** */
 public void paint(MineGraphics g) {
   for (int x = 0; x < 8; x++) {
     int sx = x * 4;
     int sy = 0;
     int w = count;
     int h = 32;
     g.drawImage(offi, sx, sy, w, h, sx, sy);
   }
   for (int y = 0; y < 8; y++) {
     int sx = 0;
     int sy = y * 4;
     int w = 32;
     int h = count;
     g.drawImage(offi, sx, sy, w, h, sx, sy);
   }
 }