OERenderMoleculeToString¶
| Link | Description | 
|---|---|
| writes a molecule display into a string (byte array) | |
| writes a molecule into a string (byte array) using the default depiction style | 
std::string OERenderMoleculeToString(const std::string &ext, const OE2DMolDisplay &disp, bool clearbackground=true)Writes a molecule display into a string.
- ext
The extension which determine the type of the image.
- disp
The OE2DMolDisplay object that holds the data necessary to depict the molecule with which it is initialized.
- clearbackground
Determines whether or not the image is cleared (by calling
OEImageBase.Clearmethod) prior to the molecule rendering.See also
OEIsRegisteredImageFilefunction
std::string OERenderMoleculeToString(const std::string &ext, const OEChem::OEMolBase &mol, bool clearbackground=true)Writes a molecule into a string using the default depiction style.
- ext
The extension which determine the type of the image.
- mol
The molecule being rendered.
- clearbackground
Determines whether or not the image is cleared (by calling
OEImageBase.Clearmethod) prior to the molecule rendering.Example:
OEGraphMol mol = new OEGraphMol(); OEChem.OESmilesToMol(mol, "c1ccccc1"); OEDepict.OEPrepareDepiction(mol); byte [] bytes = OEDepict.OERenderMoleculeToByteArray("svg", mol);See also
OEIsRegisteredImageFilefunction