rendered svg image not displaying structure properly

27 views
Skip to first unread message

sktr...@gmail.com

unread,
Dec 25, 2018, 4:45:02 AM12/25/18
to indigo-bugs
Hi,

I ran this simple example code posted on the internet. However, I changed the output format to svg, extension of file name to .svg, smile string and coloring. The resulting file shows a strange rendering of the molecule, with the heteroatoms significantly enlarged and the comment text not spaced out. It looks like a mess and is not readable. I tried using Chrome and Firefox to view the .svg file and it looks the same on both. Did anyone else run into this issue?

from indigo import *
from indigo_renderer import *
 
indigo = Indigo()
renderer = IndigoRenderer(indigo)
 
mol = indigo.loadMolecule("CN1C=NC2=C1C(=O)N(C(=O)N2C)C")
mol.layout() # if not called, will be done automatically by the renderer 
indigo.setOption("render-output-format", "png")
indigo.setOption("render-comment", "Caffeine")
indigo.setOption("render-comment-position", "top")
indigo.setOption("render-image-size", 200, 250)
indigo.setOption("render-background-color", 1.0, 1.0, 1.0)
renderer.renderToFile(mol, "caffeine.png")

Screen Shot 2018-12-25 at 12.27.25 AM.png




sdspi...@gmail.com

unread,
Mar 18, 2019, 4:56:19 AM3/18/19
to indigo-bugs

I just started testing indigo and have the same experience. PNG works fine. Would really like to use SVG.
Reply all
Reply to author
Forward
0 new messages