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

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

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

origin: fr.avianey.apache-xmlgraphics/batik

public void handleOption(String optionValue,
             SVGConverter c){
  DestinationType dstType =
    (DestinationType)mimeTypeMap.get(optionValue);
  if (dstType == null){
    throw new IllegalArgumentException();
  }
  c.setDestinationType(dstType);
}
origin: apache/batik

public void handleOption(String optionValue,
             SVGConverter c){
  DestinationType dstType =
    (DestinationType)mimeTypeMap.get(optionValue);
  if (dstType == null){
    throw new IllegalArgumentException();
  }
  c.setDestinationType(dstType);
}
origin: org.apache.xmlgraphics/batik-svgrasterizer

public void handleOption(String optionValue,
             SVGConverter c){
  DestinationType dstType =
    (DestinationType)mimeTypeMap.get(optionValue);
  if (dstType == null){
    throw new IllegalArgumentException();
  }
  c.setDestinationType(dstType);
}
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;
}

org.apache.batik.apps.rasterizerSVGConvertersetDestinationType

Javadoc

Sets the destinationType attribute value. Should not be null.

Popular methods of SVGConverter

  • <init>
  • execute
    Starts the conversion process.
  • 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
  • setSources
    Sets the list of individual SVG sources. The strings can be either URLs or file names. Note that inv
  • 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

  • Running tasks concurrently on multiple threads
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • setContentView (Activity)
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • CodeWhisperer alternatives
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