Package chemaxon.util
Class ImageExportUtil
java.lang.Object
chemaxon.marvin.io.image.ImageExportBaseUtil
chemaxon.util.ImageExportUtil
Extends
ImageExportBaseUtil
with additional methods.- Since:
- Marvin 5.2.1
-
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]
Creates a .NET based EMF picture.static void
Disables the new .NET based EMF generator.static boolean
generateEMFToFile
(String mrvSource, String exporterParamStr, String fileName) Creates a new .NET based EMF picture and saves it to the given file.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.static void
Releases and disposes native resources needed by the .NET based EMF generator.static void
Starts the initialization of the .NET based EMF generator on a background thread.Methods inherited from class chemaxon.marvin.io.image.ImageExportBaseUtil
createImageExporterParameter, createSetColoringParameter, mergeProperties
-
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, thecreateEMF(String, String)
method will return null. -
disableNewEmfGenerator
public static void disableNewEmfGenerator()Disables the new .NET based EMF generator. -
createEMF
Creates a .NET based EMF picture.- Parameters:
mrvSource
- the molecule sourceexporterParamStr
- the param string which should be applied to MolExporter.- Returns:
- the EMF picture data as byte[]
-
generateEMFToFile
Creates a new .NET based EMF picture and saves it to the given file.- Parameters:
mrvSource
- the molecule sourceexporterParamStr
- 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 objectguiprops
- an MPropertyContainer object containing GUI propertiesr
- 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:
-