Tabnine Logo
SVGConverter.setSources
Code IndexAdd Tabnine to your IDE (free)

How to use
setSources
method
in
org.apache.batik.apps.rasterizer.SVGConverter

Best Java code snippets using org.apache.batik.apps.rasterizer.SVGConverter.setSources (Showing top 4 results out of 315)

origin: com.xpn.xwiki.platform/xwiki-core

public byte[] getSVGImage(int hashCode, String content, String extension, int height, int width) throws IOException, SVGConverterException {
   File dfile = getTempFile(hashCode, "svg");
   if (!dfile.exists()) {
     FileWriter fwriter = new FileWriter(dfile);
     fwriter.write(content);
     fwriter.flush();
     fwriter.close();
   }
  File ofile = getTempFile(hashCode, extension);
  //TODO implement conversion HERE
  
  SVGConverter conv = new SVGConverter();
  // TODO PNG ONLY
  conv.setDestinationType(DestinationType.PNG);
  conv.setDst(ofile);
  conv.setHeight(height);
  conv.setWidth(width);
  String[] sources = {dfile.getAbsolutePath()};
  conv.setSources(sources);
  conv.execute();
  
  FileInputStream fis = new FileInputStream(ofile);
  byte[] result = new byte[(int)ofile.length()];
  fis.read(result);
  return result;
}

origin: org.apache.xmlgraphics/batik-svgrasterizer

c.setSources(expandedSources);
origin: fr.avianey.apache-xmlgraphics/batik

c.setSources(expandedSources);
origin: apache/batik

c.setSources(expandedSources);
org.apache.batik.apps.rasterizerSVGConvertersetSources

Javadoc

Sets the list of individual SVG sources. The strings can be either URLs or file names. Note that invalid sources (e.g., read-protected files or invalid URLs) will cause SVGConverterExceptions to be thrown during the transcoding process (see #execute);

Popular methods of SVGConverter

  • <init>
  • execute
    Starts the conversion process.
  • setDestinationType
    Sets the destinationType attribute value. Should not be null.
  • setDst
    When converting a single source, dst can be a file. Othewise, it should be a directory.
  • setHeight
    In less than or equal to zero, the height is not constrained on the output image. The height is in u
  • setWidth
    In less than or equal to zero, the width is not constrained on the output image. The width is in use
  • computeDstFiles
    Populates a vector with destination files names computed from the names of the files in the sources
  • computeSources
    Populates a vector with the set of SVG files from the srcDir if it is not null and with the sources
  • computeTranscodingHints
    Computes the set of transcoding hints to use for the operation
  • createOutputDir
    Creates directories for output files if needed.
  • getDestinationFile
    Get the name of the result image file.This method modifies the result filename, it changes the exist
  • getFileNRef
  • getDestinationFile,
  • getFileNRef,
  • getSecurityOff,
  • isFile,
  • isWriteable,
  • setAllowedScriptTypes,
  • setAlternateStylesheet,
  • setArea,
  • setBackgroundColor

Popular in Java

  • Updating database using SQL prepared statement
  • startActivity (Activity)
  • getContentResolver (Context)
  • requestLocationUpdates (LocationManager)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now