Package org.stathissideris.ascii2image.text

Examples of org.stathissideris.ascii2image.text.TextGrid.loadFrom()


  }

  @Test public void testFillContinuousAreaSInside1() throws FileNotFoundException, IOException {
    TextGrid uGrid;
    uGrid = new TextGrid();
    uGrid.loadFrom("tests/text/simple_S01.txt");
   
    CellSet filledArea = uGrid.fillContinuousArea(3, 3, '*');
    int size = filledArea.size();
   
    assertEquals(15, size);
View Full Code Here


  }

  @Test public void testFillContinuousAreaSInside2() throws FileNotFoundException, IOException {
    TextGrid uGrid;
    uGrid = new TextGrid();
    uGrid.loadFrom("tests/text/simple_S01.txt");
   
    CellSet filledArea = uGrid.fillContinuousArea(17, 3, '*');
    int size = filledArea.size();

    assertEquals(15, size);
View Full Code Here

 
  @Test public void testFindBoundariesExpandingFromSquare() throws FileNotFoundException, IOException {
    TextGrid grid;
    grid = new TextGrid();
    grid.loadFrom("tests/text/simple_square01.txt");

    CellSet wholeGridSet = new CellSet();
    addSquareToCellSet(grid, wholeGridSet, 0,0, grid.getWidth(),grid.getHeight());
   
    TextGrid copyGrid = new AbstractionGrid(grid, wholeGridSet).getCopyOfInternalBuffer();
View Full Code Here

  }

  @Test public void testFindBoundariesExpandingFromUInside() throws FileNotFoundException, IOException {
    TextGrid grid;
    grid = new TextGrid();
    grid.loadFrom("tests/text/simple_U01.txt");

    CellSet wholeGridSet = new CellSet();
    addSquareToCellSet(grid, wholeGridSet, 0,0, grid.getWidth(),grid.getHeight());
   
    TextGrid copyGrid = new AbstractionGrid(grid, wholeGridSet).getCopyOfInternalBuffer();
View Full Code Here

 
  @Test public void testFindBoundariesExpandingFromUOutside() throws FileNotFoundException, IOException {
    TextGrid grid;
    grid = new TextGrid();
    grid.loadFrom("tests/text/simple_U01.txt");

    CellSet wholeGridSet = new CellSet();
    addSquareToCellSet(grid, wholeGridSet, 0,0, grid.getWidth(),grid.getHeight());
   
    TextGrid copyGrid = new AbstractionGrid(grid, wholeGridSet).getCopyOfInternalBuffer();
View Full Code Here

   
    TextGrid grid = new TextGrid();
   
    String filename = "bug18.txt";
   
    grid.loadFrom("tests/text/"+filename);
   
    Diagram diagram = new Diagram(grid, options);
    new BitmapRenderer().renderToPNG(diagram, "tests/images/"+filename+".png", options.renderingOptions);
    long endTime = System.currentTimeMillis();
    long totalTime  = (endTime - startTime) / 1000;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.