Package chemaxon.util

Class ImageExportUtil

java.lang.Object
chemaxon.marvin.io.image.ImageExportBaseUtil
chemaxon.util.ImageExportUtil

@PublicApi public class ImageExportUtil extends chemaxon.marvin.io.image.ImageExportBaseUtil
Extends ImageExportBaseUtil with additional methods.
Since:
Marvin 5.2.1
  • Method Details

    • startEMFGenerator

      public static void startEMFGenerator()
      Starts the initialization of the .NET based EMF generator on a background thread. If the initialization has failed, disables the usage of the generator, in this case, the createEMF(String, String) method will return null.
    • disableNewEmfGenerator

      public static void disableNewEmfGenerator()
      Disables the new .NET based EMF generator.
    • createEMF

      public static byte[] createEMF(String mrvSource, String exporterParamStr)
      Creates a .NET based EMF picture.
      Parameters:
      mrvSource - the molecule source
      exporterParamStr - the param string which should be applied to MolExporter.
      Returns:
      the EMF picture data as byte[]
    • generateEMFToFile

      public static boolean generateEMFToFile(String mrvSource, String exporterParamStr, String fileName)
      Creates a new .NET based EMF picture and saves it to the given file.
      Parameters:
      mrvSource - the molecule source
      exporterParamStr - the param string which should be applied to MolExporter.
      fileName - the name of the file that should be saved.
      Returns:
      true on success, false otherwise
    • releaseNewEMFGenerator

      public static void releaseNewEMFGenerator()
      Releases and disposes native resources needed by the .NET based EMF generator. If the generator is under initialization, this method has to wait until the initialization is finished.
    • mergeProperties

      public static Properties mergeProperties(UserSettings settings, MPropertyContainer guiprops, Rectangle r)
      Merge the properties of UserSettings with the GUI properties.
      If both has a value for a given key, the value stored in GUI properties will be used. The rectangle adds the width and height property to the returned Properties object, for image sizing.
      Parameters:
      settings - a UserSettings object
      guiprops - an MPropertyContainer object containing GUI properties
      r - the Rectangle which will determine the picture size in pixels.
      Returns:
      a Properties object merged from UserSettings and GUI properties, and extended with the size information. If any of the parameters are null, those values won't added to the result.
      See Also: