@PublicAPI public class ImageExportUtil extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static byte[] |
createEMF(java.lang.String mrvSource,
java.lang.String exporterParamStr)
Creates a .NET based EMF picture.
|
static java.lang.String |
createImageExporterParameter(java.util.Properties settings,
java.lang.String format,
MDocument doc)
Creates the Image Exporter parameter String based on the values in the Properties object.
|
static java.lang.String |
createSetColoringParameter(java.util.Properties settings,
MDocument doc) |
static void |
disableNewEmfGenerator()
Disables the new .NET based EMF generator.
|
static boolean |
generateEMFToFile(java.lang.String mrvSource,
java.lang.String exporterParamStr,
java.lang.String fileName)
Creates a new .NET based EMF picture and saves it to the given file.
|
static java.util.Properties |
mergeProperties(UserSettings settings,
MPropertyContainer guiprops,
java.awt.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 java.lang.String createImageExporterParameter(java.util.Properties settings, java.lang.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 java.lang.String createSetColoringParameter(java.util.Properties settings, MDocument doc)
public static java.util.Properties mergeProperties(UserSettings settings, MPropertyContainer guiprops, java.awt.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(java.lang.String mrvSource, java.lang.String exporterParamStr)
mrvSource
- the molecule sourceexporterParamStr
- the param string which should be applied to MolExporter.public static boolean generateEMFToFile(java.lang.String mrvSource, java.lang.String exporterParamStr, java.lang.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()