public class ImageExportUtil extends Object
Modifier and Type | Method and Description |
---|---|
static byte[] |
createEMF(String mrvSource,
String exporterParamStr)
Creates a .NET based EMF picture.
|
static String |
createImageExporterParameter(Properties settings,
String format,
MDocument doc)
Creates the Image Exporter parameter String based on the values in the Properties object.
|
static void |
disableNewEmfGenerator()
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 |
releaseNewEMFGenerator()
Releases and disposes native resources needed by the .NET based EMF generator.
|
static void |
startEMFGenerator()
Starts the initialization of the .NET based EMF generator on a background thread.
|
public static String createImageExporterParameter(Properties settings, String format, MDocument doc)
settings
- see UserSettings
or
mergeProperties(UserSettings, MPropertyContainer, Rectangle)
format
- the format name used by MolExporter in the format string before the ":" signdoc
- the MDocument from which the atom set information can be gathered.public static Properties mergeProperties(UserSettings settings, MPropertyContainer guiprops, Rectangle r)
settings
- a UserSettings objectguiprops
- an MPropertyContainer object containing GUI propertiesr
- the Rectangle which will determine the picture size in pixels.MDocument.getGUIPropertyContainer()
,
MarvinPane.getUserSettings()
public static void startEMFGenerator()
createEMF(String, String)
method will return null.public static void disableNewEmfGenerator()
public static byte[] createEMF(String mrvSource, String exporterParamStr)
mrvSource
- the molecule sourceexporterParamStr
- the param string which should be applied to MolExporter.public static boolean generateEMFToFile(String mrvSource, String exporterParamStr, String fileName)
mrvSource
- the molecule sourceexporterParamStr
- the param string which should be applied to MolExporter.fileName
- the name of the file that should be saved.public static void releaseNewEMFGenerator()