Package org.apache.batik.apps.rasterizer

Examples of org.apache.batik.apps.rasterizer.Main


                File source = (File) pair.first;
                File target = (File) pair.second;
                args[index + 1] = target.getAbsolutePath();
                args[index + 2] = source.getAbsolutePath();
               
                Main rasterizer = new Main(args);
                rasterizer.execute();
            }
           
        }
    }
View Full Code Here


      final String[] args = arguments.split("\\s+");

      getLog().info("batik: args = " + Arrays.toString(args));

      final Main main = new Main(args) {

        @Override
        public boolean proceedOnSourceTranscodingFailure(
            final SVGConverterSource source, final File dest,
            final String errorCode) {

          super.proceedOnSourceTranscodingFailure(source, dest,
              errorCode);

          final String message = "batik: convert failed";
          getLog().error(message);
          throw new RuntimeException(message);

        }

        @Override
        public void validateConverterConfig(final SVGConverter c) {

          @SuppressWarnings("unchecked")
          final List<String> expandedSources = c.getSources();

          if ((expandedSources == null)
              || (expandedSources.size() < 1)) {

            getLog().info(USAGE);

            final String message = "batik: invalid config";

            getLog().error(message);

            throw new RuntimeException(message);

          }

        }

      };

      main.execute();

    } catch (final Throwable exception) {

      final String help = "http://xmlgraphics.apache.org/batik/tools/rasterizer.html";
View Full Code Here

TOP

Related Classes of org.apache.batik.apps.rasterizer.Main

Copyright © 2018 www.massapicom. 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.