Package org.stathissideris.ascii2image.text

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


        System.exit(1);
      }
     
      if(options.processingOptions.printDebugOutput()){
        if (!stdOut) System.out.println("Using grid:");
        grid.printDebug();
      }
     
      Diagram diagram = new Diagram(grid, options);
      if (!stdOut) System.out.println("Rendering to file: "+toFilename);
     
View Full Code Here


    height = grid.getHeight() * cellHeight;
   
    TextGrid workGrid = new TextGrid(grid);
    workGrid.replaceTypeOnLine();
    workGrid.replacePointMarkersOnLine();
    if(DEBUG) workGrid.printDebug();
   
    int width = grid.getWidth();
    int height = grid.getHeight();

 
View Full Code Here

        }
        gridOfSmalls.fillCellsWith(set2, '*');
      }
      if(DEBUG_VERBOSE){
        System.out.println("Sum of smalls:");
        gridOfSmalls.printDebug();
      }
      TextGrid gridLargest = new TextGrid(largest.getMaxX() + 2, largest.getMaxY() + 2);
      gridLargest.fillCellsWith(largest, '*');

      int index = filledSets.indexOf(largest);
View Full Code Here

    TextGrid workGrid = new TextGrid(grid.getWidth(), grid.getHeight());
    grid.copyCellsTo(cells, workGrid);
   
    if (DEBUG){
      System.out.println("Making closed shape from buffer:");
      workGrid.printDebug();
    }
   
    TextGrid.Cell start = (TextGrid.Cell) cells.getFirst();
    if(workGrid.isCorner(start)) shape.addToPoints(makePointForCell(start, workGrid, cellWidth, cellHeight, allRound));
    TextGrid.Cell previous = start;
View Full Code Here

        }

        Future<RenderedImage> future = RENDER_EXECUTOR.submit(new Callable<RenderedImage>() {
            public RenderedImage call() throws Exception {
                grid.initialiseWithText(gridText, options.processingOptions);
                grid.printDebug();

                Diagram diagram = new Diagram(grid, options);
                return new BitmapRenderer().renderToImage(diagram, options.renderingOptions);
            }
        });
View Full Code Here

        debug("External renderer: allowing " + timeoutMillis + " ms to complete.");

        {
            TextGrid grid = new TextGrid();
            grid.initialiseWithText(gridText, options.processingOptions);
            grid.printDebug();
            debug("Printed grid in " + (System.currentTimeMillis() - start) + " ms");
        }

        File workingDir = new File("/tmp");
        String classPath = Config.getExternalRenderClasspath(context);
View Full Code Here

                grid.initialiseWithText("/-+\n| |\n+-/", options.processingOptions);
            }
        }
        else grid.initialiseWithText(gridText, options.processingOptions);

        grid.printDebug();

        long start = System.currentTimeMillis();
        Diagram diagram = new Diagram(grid, options);
        final RenderedImage image = new BitmapRenderer().renderToImage(diagram, options.renderingOptions);
        System.out.println("0. Rendered in " + (System.currentTimeMillis() - start) + " ms");
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.