Example #1
0
 public void markBoundary() {
   if (this.state == CONTROLLER_STATE.CONTROLLER_HOLE) {
     ArrayList<Pixel> boundaryPixels = this.gridAlgorithm2.findBoundary();
     this.counterPixelsHistory = new ArrayList<Pixel>();
     for (Pixel p : boundaryPixels) {
       this.counterPixelsHistory.add(new Pixel(p.getX(), p.getY(), p.getValue()));
     }
     Grid.getInstance().markBoundary(boundaryPixels);
     refreshView();
     this.state = CONTROLLER_STATE.CONTROLLER_BOUNDARY;
   }
 }
Example #2
0
 public void markBoundary1() {
   if (this.state == CONTROLLER_STATE.CONTROLLER_HOLE) {
     this.holePixelsInfo = this.gridAlgorithm.findBoundaryAndHoles();
     this.counterPixelsHistory = new ArrayList<Pixel>();
     for (Pixel p : holePixelsInfo.getBoundaryPixels()) {
       this.counterPixelsHistory.add(new Pixel(p.getX(), p.getY(), p.getValue()));
     }
     Grid.getInstance().markBoundary(this.holePixelsInfo.getBoundaryPixels());
     refreshView();
     this.state = CONTROLLER_STATE.CONTROLLER_BOUNDARY;
   }
 }