Examples of ConversionOptions


Examples of org.stathissideris.ascii2image.core.ConversionOptions

  /** Generates the image from the specified text to the output file.
   * @param text the ascii art text.
   * @param outputFile the file name of the image that is generated.
   */
  private void generateImage(String text, File outputFile) {
    ConversionOptions options = new ConversionOptions();
    TextGrid textGrid = new TextGrid();
    try {
      if(!textGrid.initialiseWithText(text, null)) {
        error("Cannot initialize text grid");
      }
View Full Code Here

Examples of org.stathissideris.ascii2image.core.ConversionOptions

    System.out.println("Tests completed");
  }

  @Test
  public void compareImages() throws FileNotFoundException, IOException {
    ConversionOptions options = new ConversionOptions();
    File actualFile = new File(actualDir + File.separator + textFile.getName() + ".png");
    File expectedFile = new File(expectedDir + File.separator + textFile.getName() + ".png");
       
    System.out.println(index + ") Rendering "+textFile+" to "+actualFile);
   
View Full Code Here

Examples of org.stathissideris.ascii2image.core.ConversionOptions

    return false;
  }
 
  public static void generateImages(List<File> textFiles, String destinationDir) {
   
    ConversionOptions options = new ConversionOptions();
   
    for(File textFile : textFiles) {
      TextGrid grid = new TextGrid();

      File toFile = new File(destinationDir + File.separator + textFile.getName() + ".png");
View Full Code Here

Examples of org.stathissideris.ascii2image.core.ConversionOptions

  }
 
 
  public static boolean createHTMLTestReport(List<File> textFiles, String reportDir, String reportName){

    ConversionOptions options = new ConversionOptions();

    String reportFilename = reportDir+"/"+reportName+".html";

    if(!(new File(reportDir).exists())){
      File dir = new File(reportDir);
View Full Code Here

Examples of org.stathissideris.ascii2image.core.ConversionOptions

  public static void main(String[] args) throws Exception {
   
   
    long startTime = System.currentTimeMillis();
   
    ConversionOptions options = new ConversionOptions();
   
    TextGrid grid = new TextGrid();
   
    String filename = "bug18.txt";
   
View Full Code Here

Examples of org.stathissideris.ascii2image.core.ConversionOptions

    public void transmitImage(final HttpServletRequest request, final HttpServletResponse response)
            throws IOException, ServletException
    {
        long start = System.currentTimeMillis();
        final ConversionOptions options = new ConversionOptions();
        options.processingOptions.setCharacterEncoding("UTF-8");

        @SuppressWarnings({"unchecked"}) Map<String,String[]> paramMap = request.getParameterMap();
        boolean noAntiAlias = paramMap.containsKey("A") || paramMap.containsKey("no-antialias");
        boolean noShadows = paramMap.containsKey("S") || paramMap.containsKey("no-shadows");
View Full Code Here

Examples of org.stathissideris.ascii2image.core.ConversionOptions

import java.io.*;
import java.util.ArrayList;

public class DitaaTest {
    public static void main(String[] args) throws UnsupportedEncodingException {
        ConversionOptions options = new ConversionOptions();

        TextGrid grid = new TextGrid();

        boolean noAntiAlias = false;
        boolean noShadows = false;
View Full Code Here

Examples of org.stathissideris.ascii2image.core.ConversionOptions

        String base64 = null;
        boolean html = false;

        try {
            options = new ConversionOptions();

            boolean shadows = getOption(_shadows, true);
            boolean antialias = getOption(_antialias, true);
            boolean roundedCorners = "rounded".equals(getOption(_corners, "rounded"));
            boolean separation = getOption(_separation, true);
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.