Hi Michal,

This is now one of the draw options;

In [3]: d2d = rdMolDraw2D.MolDraw2DSVG(300,300)

In [4]: opts = d2d.drawOptions()

In [6]: opts.setBackgroundColour((1,1,0))


You can set the default highlightColour the same way.

There's not currently a "make it transparent" option, but that would be a
nice thing for us to figure out how to do. I will take a look

-greg


On Wed, Sep 20, 2017 at 1:08 PM, Michał Nowotka <mmm...@gmail.com> wrote:

> Hi,
>
> In the old drawing code it was possible to pass drawing options to the
> MolToImage method.
>
> Lookng at the C++ signature of the new DrawMolecule
>
> DrawMolecule( (MolDraw2D)self, (Mol)mol, (object)highlightAtoms,
> (object)highlightBonds [, (object)highlightAtomColors=None [,
> (object)highlightBondColors=None [, (object)highlightAtomRadii=None [,
> (int)confId=-1 [, (str)legend='']]]]]) -> None
>
> I can see it's possible to change higlight colors but I need to be
> able to change background color of the png image. I want to to be
> transparent by default but I should be able to set it to any other
> solid color, is that possible?
>
> Cheers,
> Michał
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to