User 366e966a35
21-12-2010 16:26:45
Hello!
I programmatically read a molecule from .cdx file and then try to export it to EMF drawing. During this conversion an exception occurs:
java.util.NoSuchElementException
at java.util.TreeMap.key(TreeMap.java:1206)
at java.util.TreeMap.firstKey(TreeMap.java:267)
at java.util.TreeSet.first(TreeSet.java:377)
at org.freehep.graphicsio.ImageGraphics2D.getPreferredImageWriter(ImageGraphics2D.java:453)
at org.freehep.graphicsio.ImageGraphics2D.writeImage(ImageGraphics2D.java:405)
at org.freehep.graphicsio.emf.gdi.AlphaBlend.write(AlphaBlend.java:139)
at org.freehep.graphicsio.emf.EMFTag.write(EMFTag.java:45)
at org.freehep.util.io.TaggedOutputStream.writeTag(TaggedOutputStream.java:89)
at org.freehep.graphicsio.emf.EMFOutputStream.writeTag(EMFOutputStream.java:242)
at org.freehep.graphicsio.emf.EMFGraphics2D.writeImage(EMFGraphics2D.java:424)
at org.freehep.graphicsio.AbstractVectorGraphicsIO.drawImage(AbstractVectorGraphicsIO.java:482)
at org.freehep.graphicsio.AbstractVectorGraphicsIO.drawImage(AbstractVectorGraphicsIO.java:379)
at chemaxon.marvin.paint.internal.MolPainter.paintAtom(Unknown Source)
at chemaxon.marvin.paint.internal.MolPainter.paintObjects(Unknown Source)
at chemaxon.marvin.paint.internal.MolPainter.paintDocument(Unknown Source)
at chemaxon.marvin.paint.internal.MolPainter.paintDocument(Unknown Source)
at chemaxon.marvin.io.formats.image.ImageExport.paint(Unknown Source)
at chemaxon.marvin.io.formats.vectgraphics.VectGraphicsExport.convert(Unknown Source)
at chemaxon.struc.Molecule.exportToObject(Unknown Source)
at chemaxon.struc.Molecule.exportToObject(Unknown Source)
at chemaxon.struc.Molecule.exportToBinFormat(Unknown Source)
at chemaxon.struc.Molecule.toBinFormat(Unknown Source)
I tried to export a molecule to EMF picture with MolExporter and Molecule.toBinFormat() with no difference. Export string is "emf:scale30". Sample files are included in the archive.
Is this a bug or a misuse of MarvinSketch API?
Thank you!