Hi Greg et al, I was thinking about html5 renderer. We can use Raphaeljs for this. In the documentation you can find Paper.add method:
http://raphaeljs.com/reference.html#Paper.add Which accepts JSON describing primitives and their attributes (coordinates, colors, etc.). So the task would be to write another Canvas class returning such JSON object. This should be pretty easy but the question is: where such a class should be placed: 1. rdkit.sping.JSON 2. rdkit.Chem.Draw.jsonCanvas Both options are far from perfect. Choosing 1, all other image formats will be produced by sping. Choosing 2, no other formats will be produced at all. See https://github.com/rdkit/rdkit/blob/master/rdkit/Chem/Draw/__init__.py IMO there is a wrong assumption formulated in Draw/__init__.py that Canvas class has to support all possible image types: https://github.com/rdkit/rdkit/blob/master/rdkit/Chem/Draw/__init__.py#L131 Notice that in MolToMPL imageType parameter is completely ignored: https://github.com/rdkit/rdkit/blob/master/rdkit/Chem/Draw/__init__.py#L183 Of course we can add another method to Draw/__init__.py like MolToJSON but we will loose generality. It seems like the whole image generation part requires some redesign because it's not DRY enough... But if you have some ideas how and where should the new class be implemented let me know, I will try to write it. Regards, Michał Nowotka ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk _______________________________________________ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss